@compfest-18/oppenheimer-schema 0.0.6-staging.f62347d → 0.0.7-develop.77f855e

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -47,6 +47,11 @@ var submissionStatusEnum = pgEnum("submission_status", [
47
47
  "REJECTED",
48
48
  "ACCEPTED"
49
49
  ]);
50
+ var joinRequestStatusEnum = pgEnum("join_request_status", [
51
+ "PENDING",
52
+ "ACCEPTED",
53
+ "REJECTED"
54
+ ]);
50
55
  var knowEventSourceEnum = pgEnum("know_event_source", [
51
56
  "INSTAGRAM",
52
57
  "WEBSITE",
@@ -87,13 +92,16 @@ var cartStatusEnum = pgEnum("cart_status", [
87
92
 
88
93
  // auth/user.schema.ts
89
94
  import { sql } from "drizzle-orm";
90
- import { pgTable, text, timestamp } from "drizzle-orm/pg-core";
95
+ import { boolean, pgTable, text, timestamp } from "drizzle-orm/pg-core";
91
96
  var users = pgTable("users", {
92
97
  id: text("id").primaryKey(),
93
98
  email: text("email").notNull().unique(),
94
99
  name: text("name").notNull(),
95
100
  image: text("image"),
96
101
  referralCode: text("referral_code").notNull().unique().default(sql`substring(replace(gen_random_uuid()::text, '-', ''), 1, 8)`),
102
+ // Once true, SSO sync (login-time) no longer overwrites `name` with the
103
+ // SSO-provided value — the user has set a COMPFEST-local display name.
104
+ isNameCustom: boolean("is_name_custom").notNull().default(false),
97
105
  createdAt: timestamp("createdAt").notNull().defaultNow(),
98
106
  updatedAt: timestamp("updatedAt").notNull().defaultNow()
99
107
  });
@@ -231,6 +239,8 @@ var xcelerateRegistrations = pgTable6(
231
239
  jobCategory: text6("job_category"),
232
240
  knowEventSource: knowEventSourceEnum("know_event_source"),
233
241
  batch: text6("batch"),
242
+ cvUrl: text6("cv_url"),
243
+ cvFileName: text6("cv_file_name"),
234
244
  deletedAt: timestamp6("deleted_at"),
235
245
  createdAt: timestamp6("created_at").notNull().defaultNow(),
236
246
  updatedAt: timestamp6("updated_at").notNull().defaultNow()
@@ -301,7 +311,7 @@ var eventsRelations = relations7(events, ({ many }) => ({
301
311
 
302
312
  // feedback/feedback.schema.ts
303
313
  import { relations as relations11 } from "drizzle-orm";
304
- import { boolean, index as index10, pgTable as pgTable12, text as text12, timestamp as timestamp12 } from "drizzle-orm/pg-core";
314
+ import { boolean as boolean2, index as index10, pgTable as pgTable12, text as text12, timestamp as timestamp12 } from "drizzle-orm/pg-core";
305
315
 
306
316
  // feedback/feedback-question.schema.ts
307
317
  import { relations as relations9 } from "drizzle-orm";
@@ -383,7 +393,7 @@ var feedbacks = pgTable12(
383
393
  {
384
394
  id: text12("id").primaryKey(),
385
395
  eventId: text12("event_id").notNull().unique().references(() => events.id, { onDelete: "cascade" }),
386
- isOpen: boolean("is_open").notNull().default(true),
396
+ isOpen: boolean2("is_open").notNull().default(true),
387
397
  deletedAt: timestamp12("deleted_at"),
388
398
  createdAt: timestamp12("created_at").notNull().defaultNow(),
389
399
  updatedAt: timestamp12("updated_at").notNull().defaultNow()
@@ -397,15 +407,15 @@ var feedbacksRelations = relations11(feedbacks, ({ many }) => ({
397
407
 
398
408
  // programs/member.schema.ts
399
409
  import { relations as relations16 } from "drizzle-orm";
400
- import { boolean as boolean3, index as index15, pgTable as pgTable17, text as text17, timestamp as timestamp17 } from "drizzle-orm/pg-core";
410
+ import { boolean as boolean5, index as index15, pgTable as pgTable17, text as text17, timestamp as timestamp17 } from "drizzle-orm/pg-core";
401
411
 
402
412
  // programs/team.schema.ts
403
413
  import { relations as relations15 } from "drizzle-orm";
404
- import { index as index14, pgTable as pgTable16, text as text16, timestamp as timestamp16 } from "drizzle-orm/pg-core";
414
+ import { boolean as boolean4, index as index14, integer as integer2, pgTable as pgTable16, text as text16, timestamp as timestamp16 } from "drizzle-orm/pg-core";
405
415
 
406
416
  // programs/program.schema.ts
407
417
  import { relations as relations14 } from "drizzle-orm";
408
- import { boolean as boolean2, index as index13, integer, jsonb, pgTable as pgTable15, text as text15, timestamp as timestamp15 } from "drizzle-orm/pg-core";
418
+ import { boolean as boolean3, index as index13, integer, jsonb, pgTable as pgTable15, text as text15, timestamp as timestamp15 } from "drizzle-orm/pg-core";
409
419
 
410
420
  // programs/program-registration.schema.ts
411
421
  import { relations as relations12 } from "drizzle-orm";
@@ -480,7 +490,7 @@ var programs = pgTable15(
480
490
  allowedEducationLevel: text15("allowed_education_level"),
481
491
  minMember: integer("min_member"),
482
492
  maxMember: integer("max_member"),
483
- isAbleToRegisterAsTeam: boolean2("is_able_to_register_as_team").notNull().default(false),
493
+ isAbleToRegisterAsTeam: boolean3("is_able_to_register_as_team").notNull().default(false),
484
494
  paymentBills: jsonb("payment_bills"),
485
495
  startDate: timestamp15("start_date"),
486
496
  extendStartDate: timestamp15("extend_start_date"),
@@ -518,6 +528,8 @@ var teams = pgTable16(
518
528
  code: text16("code").notNull().unique(),
519
529
  status: teamStatusEnum("status").notNull().default("WAITING_FOR_VERIFICATION"),
520
530
  notes: text16("notes"),
531
+ isPublic: boolean4("is_public").notNull().default(false),
532
+ batch: integer2("batch").notNull().default(1),
521
533
  deletedAt: timestamp16("deleted_at"),
522
534
  createdAt: timestamp16("created_at").notNull().defaultNow(),
523
535
  updatedAt: timestamp16("updated_at").notNull().defaultNow()
@@ -543,7 +555,7 @@ var members = pgTable17(
543
555
  id: text17("id").primaryKey(),
544
556
  userId: text17("user_id").notNull().references(() => users.id, { onDelete: "cascade" }),
545
557
  teamId: text17("team_id").notNull().references(() => teams.id, { onDelete: "cascade" }),
546
- isLeader: boolean3("is_leader").notNull().default(false),
558
+ isLeader: boolean5("is_leader").notNull().default(false),
547
559
  deletedAt: timestamp17("deleted_at"),
548
560
  createdAt: timestamp17("created_at").notNull().defaultNow(),
549
561
  updatedAt: timestamp17("updated_at").notNull().defaultNow()
@@ -564,27 +576,98 @@ var membersRelations = relations16(members, ({ one }) => ({
564
576
  })
565
577
  }));
566
578
 
567
- // tasks/program-task.schema.ts
579
+ // programs/team-join-request.schema.ts
568
580
  import { relations as relations17 } from "drizzle-orm";
569
581
  import { index as index16, pgTable as pgTable18, text as text18, timestamp as timestamp18 } from "drizzle-orm/pg-core";
570
- var programTasks = pgTable18(
571
- "program_tasks",
582
+ var teamJoinRequests = pgTable18(
583
+ "team_join_requests",
572
584
  {
573
585
  id: text18("id").primaryKey(),
574
- programId: text18("program_id").notNull().references(() => programs.id, { onDelete: "cascade" }),
575
- title: text18("title").notNull(),
576
- deadline: timestamp18("deadline"),
577
- description: text18("description"),
578
- guideBookUrl: text18("guide_book_url"),
579
- type: programTaskTypeEnum("type").notNull(),
580
- acceptedFileTypes: fileTypeEnum("accepted_file_types").array(),
586
+ teamId: text18("team_id").notNull().references(() => teams.id, { onDelete: "cascade" }),
587
+ userId: text18("user_id").notNull().references(() => users.id, { onDelete: "cascade" }),
588
+ status: joinRequestStatusEnum("status").notNull().default("PENDING"),
581
589
  deletedAt: timestamp18("deleted_at"),
582
590
  createdAt: timestamp18("created_at").notNull().defaultNow(),
583
591
  updatedAt: timestamp18("updated_at").notNull().defaultNow()
584
592
  },
585
- (table) => [index16("program_tasks_program_id_idx").on(table.programId)]
593
+ (table) => [
594
+ index16("team_join_requests_team_id_idx").on(table.teamId),
595
+ index16("team_join_requests_user_id_idx").on(table.userId)
596
+ ]
597
+ );
598
+ var teamJoinRequestsRelations = relations17(teamJoinRequests, ({ one }) => ({
599
+ team: one(teams, {
600
+ fields: [teamJoinRequests.teamId],
601
+ references: [teams.id]
602
+ }),
603
+ user: one(users, {
604
+ fields: [teamJoinRequests.userId],
605
+ references: [users.id]
606
+ })
607
+ }));
608
+
609
+ // tasks/competition-payment-proof.schema.ts
610
+ import { relations as relations18, sql as sql2 } from "drizzle-orm";
611
+ import { index as index17, pgTable as pgTable19, text as text19, timestamp as timestamp19, uniqueIndex } from "drizzle-orm/pg-core";
612
+ var competitionPaymentProofs = pgTable19(
613
+ "competition_payment_proofs",
614
+ {
615
+ id: text19("id").primaryKey(),
616
+ programId: text19("program_id").notNull().references(() => programs.id, { onDelete: "cascade" }),
617
+ teamId: text19("team_id").references(() => teams.id, { onDelete: "cascade" }),
618
+ userId: text19("user_id").references(() => users.id, { onDelete: "cascade" }),
619
+ fileUrl: text19("file_url").notNull(),
620
+ fileName: text19("file_name").notNull(),
621
+ status: submissionStatusEnum("status").notNull().default("PENDING"),
622
+ createdAt: timestamp19("created_at").notNull().defaultNow(),
623
+ updatedAt: timestamp19("updated_at").notNull().defaultNow()
624
+ },
625
+ (table) => [
626
+ index17("competition_payment_proofs_program_id_idx").on(table.programId),
627
+ index17("competition_payment_proofs_team_id_idx").on(table.teamId),
628
+ index17("competition_payment_proofs_user_id_idx").on(table.userId),
629
+ uniqueIndex("competition_payment_proofs_program_team_uniq").on(table.programId, table.teamId).where(sql2`${table.teamId} IS NOT NULL`),
630
+ uniqueIndex("competition_payment_proofs_program_user_uniq").on(table.programId, table.userId).where(sql2`${table.userId} IS NOT NULL`)
631
+ ]
586
632
  );
587
- var programTasksRelations = relations17(programTasks, ({ one }) => ({
633
+ var competitionPaymentProofsRelations = relations18(competitionPaymentProofs, ({ one }) => ({
634
+ program: one(programs, {
635
+ fields: [competitionPaymentProofs.programId],
636
+ references: [programs.id]
637
+ }),
638
+ team: one(teams, {
639
+ fields: [competitionPaymentProofs.teamId],
640
+ references: [teams.id]
641
+ }),
642
+ user: one(users, {
643
+ fields: [competitionPaymentProofs.userId],
644
+ references: [users.id]
645
+ })
646
+ }));
647
+
648
+ // tasks/program-task.schema.ts
649
+ import { relations as relations19 } from "drizzle-orm";
650
+ import { boolean as boolean6, index as index18, pgTable as pgTable20, text as text20, timestamp as timestamp20 } from "drizzle-orm/pg-core";
651
+ var programTasks = pgTable20(
652
+ "program_tasks",
653
+ {
654
+ id: text20("id").primaryKey(),
655
+ programId: text20("program_id").notNull().references(() => programs.id, { onDelete: "cascade" }),
656
+ title: text20("title").notNull(),
657
+ deadline: timestamp20("deadline"),
658
+ description: text20("description"),
659
+ guideBookUrl: text20("guide_book_url"),
660
+ type: programTaskTypeEnum("type").notNull(),
661
+ acceptedFileTypes: fileTypeEnum("accepted_file_types").array(),
662
+ isOptional: boolean6("is_optional").notNull().default(false),
663
+ isRegistrationTask: boolean6("is_registration_task").notNull().default(false),
664
+ deletedAt: timestamp20("deleted_at"),
665
+ createdAt: timestamp20("created_at").notNull().defaultNow(),
666
+ updatedAt: timestamp20("updated_at").notNull().defaultNow()
667
+ },
668
+ (table) => [index18("program_tasks_program_id_idx").on(table.programId)]
669
+ );
670
+ var programTasksRelations = relations19(programTasks, ({ one }) => ({
588
671
  program: one(programs, {
589
672
  fields: [programTasks.programId],
590
673
  references: [programs.id]
@@ -592,22 +675,22 @@ var programTasksRelations = relations17(programTasks, ({ one }) => ({
592
675
  }));
593
676
 
594
677
  // tasks/program-task-extra-description.schema.ts
595
- import { relations as relations18 } from "drizzle-orm";
596
- import { boolean as boolean4, index as index17, pgTable as pgTable19, text as text19, timestamp as timestamp19 } from "drizzle-orm/pg-core";
597
- var programTaskExtraDescriptions = pgTable19(
678
+ import { relations as relations20 } from "drizzle-orm";
679
+ import { boolean as boolean7, index as index19, pgTable as pgTable21, text as text21, timestamp as timestamp21 } from "drizzle-orm/pg-core";
680
+ var programTaskExtraDescriptions = pgTable21(
598
681
  "program_task_extra_descriptions",
599
682
  {
600
- id: text19("id").primaryKey(),
601
- taskId: text19("task_id").notNull().references(() => programTasks.id, { onDelete: "cascade" }),
602
- description: text19("description").notNull(),
603
- forProgram: boolean4("for_program").notNull().default(true),
604
- deletedAt: timestamp19("deleted_at"),
605
- createdAt: timestamp19("created_at").notNull().defaultNow(),
606
- updatedAt: timestamp19("updated_at").notNull().defaultNow()
683
+ id: text21("id").primaryKey(),
684
+ taskId: text21("task_id").notNull().references(() => programTasks.id, { onDelete: "cascade" }),
685
+ description: text21("description").notNull(),
686
+ forProgram: boolean7("for_program").notNull().default(true),
687
+ deletedAt: timestamp21("deleted_at"),
688
+ createdAt: timestamp21("created_at").notNull().defaultNow(),
689
+ updatedAt: timestamp21("updated_at").notNull().defaultNow()
607
690
  },
608
- (table) => [index17("program_task_extra_descriptions_task_id_idx").on(table.taskId)]
691
+ (table) => [index19("program_task_extra_descriptions_task_id_idx").on(table.taskId)]
609
692
  );
610
- var programTaskExtraDescriptionsRelations = relations18(
693
+ var programTaskExtraDescriptionsRelations = relations20(
611
694
  programTaskExtraDescriptions,
612
695
  ({ one }) => ({
613
696
  task: one(programTasks, {
@@ -618,51 +701,51 @@ var programTaskExtraDescriptionsRelations = relations18(
618
701
  );
619
702
 
620
703
  // tasks/program-task-submission.schema.ts
621
- import { relations as relations19 } from "drizzle-orm";
622
- import { index as index18, pgEnum as pgEnum2, pgTable as pgTable20, text as text20, timestamp as timestamp20 } from "drizzle-orm/pg-core";
704
+ import { relations as relations21 } from "drizzle-orm";
705
+ import { index as index20, pgEnum as pgEnum2, pgTable as pgTable22, text as text22, timestamp as timestamp22 } from "drizzle-orm/pg-core";
623
706
  var submissionStatusEnumLocal = pgEnum2("submission_status", [
624
707
  "PENDING",
625
708
  "REJECTED",
626
709
  "ACCEPTED"
627
710
  ]);
628
- var programTaskSubmissions = pgTable20(
711
+ var programTaskSubmissions = pgTable22(
629
712
  "programTaskSubmissions",
630
713
  {
631
- id: text20("id").primaryKey(),
632
- taskId: text20("taskId").references(() => programTasks.id, {
714
+ id: text22("id").primaryKey(),
715
+ taskId: text22("taskId").references(() => programTasks.id, {
633
716
  onDelete: "cascade"
634
717
  }),
635
- teamId: text20("teamId").references(() => teams.id, {
718
+ teamId: text22("teamId").references(() => teams.id, {
636
719
  onDelete: "cascade"
637
720
  }),
638
- userId: text20("userId").references(() => users.id, {
721
+ userId: text22("userId").references(() => users.id, {
639
722
  onDelete: "cascade"
640
723
  }),
641
- fileUrl: text20("fileUrl"),
642
- fileName: text20("fileName"),
724
+ fileUrl: text22("fileUrl"),
725
+ fileName: text22("fileName"),
643
726
  status: submissionStatusEnumLocal("status").notNull().default("PENDING"),
644
- feedback: text20("feedback"),
727
+ feedback: text22("feedback"),
645
728
  submissionForProgram: programCodeEnum("submissionForProgram"),
646
- createdAt: timestamp20("createdAt").notNull().defaultNow(),
647
- updatedAt: timestamp20("updatedAt").notNull().defaultNow()
729
+ createdAt: timestamp22("createdAt").notNull().defaultNow(),
730
+ updatedAt: timestamp22("updatedAt").notNull().defaultNow()
648
731
  },
649
732
  (table) => [
650
- index18("program_task_submissions_task_id_idx").on(table.taskId),
651
- index18("program_task_submissions_team_id_idx").on(table.teamId),
652
- index18("program_task_submissions_user_id_idx").on(table.userId),
653
- index18("program_task_submissions_task_team_program_idx").on(
733
+ index20("program_task_submissions_task_id_idx").on(table.taskId),
734
+ index20("program_task_submissions_team_id_idx").on(table.teamId),
735
+ index20("program_task_submissions_user_id_idx").on(table.userId),
736
+ index20("program_task_submissions_task_team_program_idx").on(
654
737
  table.taskId,
655
738
  table.teamId,
656
739
  table.submissionForProgram
657
740
  ),
658
- index18("program_task_submissions_task_user_program_idx").on(
741
+ index20("program_task_submissions_task_user_program_idx").on(
659
742
  table.taskId,
660
743
  table.userId,
661
744
  table.submissionForProgram
662
745
  )
663
746
  ]
664
747
  );
665
- var programTaskSubmissionsRelations = relations19(programTaskSubmissions, ({ one }) => ({
748
+ var programTaskSubmissionsRelations = relations21(programTaskSubmissions, ({ one }) => ({
666
749
  task: one(programTasks, {
667
750
  fields: [programTaskSubmissions.taskId],
668
751
  references: [programTasks.id]
@@ -678,54 +761,54 @@ var programTaskSubmissionsRelations = relations19(programTaskSubmissions, ({ one
678
761
  }));
679
762
 
680
763
  // tasks/xcelerate-workshop-task.schema.ts
681
- import { index as index19, integer as integer2, pgTable as pgTable21, text as text21, timestamp as timestamp21 } from "drizzle-orm/pg-core";
682
- var xcelerateWorkshopTasks = pgTable21(
764
+ import { index as index21, integer as integer3, pgTable as pgTable23, text as text23, timestamp as timestamp23 } from "drizzle-orm/pg-core";
765
+ var xcelerateWorkshopTasks = pgTable23(
683
766
  "xcelerateWorkshopTasks",
684
767
  {
685
- id: text21("id").primaryKey(),
686
- title: text21("title").notNull(),
687
- description: text21("description"),
688
- deadline: timestamp21("deadline"),
689
- batch: integer2("batch"),
690
- taskUrl: text21("taskUrl"),
691
- createdAt: timestamp21("createdAt").notNull().defaultNow(),
692
- updatedAt: timestamp21("updatedAt").notNull().defaultNow()
768
+ id: text23("id").primaryKey(),
769
+ title: text23("title").notNull(),
770
+ description: text23("description"),
771
+ deadline: timestamp23("deadline"),
772
+ batch: integer3("batch"),
773
+ taskUrl: text23("taskUrl"),
774
+ createdAt: timestamp23("createdAt").notNull().defaultNow(),
775
+ updatedAt: timestamp23("updatedAt").notNull().defaultNow()
693
776
  },
694
777
  (table) => [
695
- index19("xcelerate_workshop_tasks_batch_idx").on(table.batch),
696
- index19("xcelerate_workshop_tasks_deadline_idx").on(table.deadline)
778
+ index21("xcelerate_workshop_tasks_batch_idx").on(table.batch),
779
+ index21("xcelerate_workshop_tasks_deadline_idx").on(table.deadline)
697
780
  ]
698
781
  );
699
782
 
700
783
  // tasks/xcelerate-workshop-task-submission.schema.ts
701
- import { relations as relations20 } from "drizzle-orm";
702
- import { index as index20, pgTable as pgTable22, text as text22, timestamp as timestamp22, uniqueIndex } from "drizzle-orm/pg-core";
703
- var xcelerateWorkshopTaskSubmissions = pgTable22(
784
+ import { relations as relations22 } from "drizzle-orm";
785
+ import { index as index22, pgTable as pgTable24, text as text24, timestamp as timestamp24, uniqueIndex as uniqueIndex2 } from "drizzle-orm/pg-core";
786
+ var xcelerateWorkshopTaskSubmissions = pgTable24(
704
787
  "xcelerateWorkshopTaskSubmissions",
705
788
  {
706
- id: text22("id").primaryKey(),
707
- taskId: text22("taskId").references(() => xcelerateWorkshopTasks.id, {
789
+ id: text24("id").primaryKey(),
790
+ taskId: text24("taskId").references(() => xcelerateWorkshopTasks.id, {
708
791
  onDelete: "cascade"
709
792
  }),
710
- userId: text22("userId").references(() => users.id, {
793
+ userId: text24("userId").references(() => users.id, {
711
794
  onDelete: "cascade"
712
795
  }),
713
- fileUrl: text22("fileUrl"),
796
+ fileUrl: text24("fileUrl"),
714
797
  status: submissionStatusEnum("status").notNull().default("PENDING"),
715
- feedback: text22("feedback"),
716
- createdAt: timestamp22("createdAt").notNull().defaultNow(),
717
- updatedAt: timestamp22("updatedAt").notNull().defaultNow()
798
+ feedback: text24("feedback"),
799
+ createdAt: timestamp24("createdAt").notNull().defaultNow(),
800
+ updatedAt: timestamp24("updatedAt").notNull().defaultNow()
718
801
  },
719
802
  (table) => [
720
- index20("xcelerate_workshop_task_submissions_task_id_idx").on(table.taskId),
721
- index20("xcelerate_workshop_task_submissions_user_id_idx").on(table.userId),
722
- uniqueIndex("xcelerate_workshop_task_submissions_task_user_idx").on(
803
+ index22("xcelerate_workshop_task_submissions_task_id_idx").on(table.taskId),
804
+ index22("xcelerate_workshop_task_submissions_user_id_idx").on(table.userId),
805
+ uniqueIndex2("xcelerate_workshop_task_submissions_task_user_idx").on(
723
806
  table.taskId,
724
807
  table.userId
725
808
  )
726
809
  ]
727
810
  );
728
- var xcelerateWorkshopTaskSubmissionsRelations = relations20(
811
+ var xcelerateWorkshopTaskSubmissionsRelations = relations22(
729
812
  xcelerateWorkshopTaskSubmissions,
730
813
  ({ one }) => ({
731
814
  task: one(xcelerateWorkshopTasks, {
@@ -740,35 +823,35 @@ var xcelerateWorkshopTaskSubmissionsRelations = relations20(
740
823
  );
741
824
 
742
825
  // announcements/announcement.schema.ts
743
- import { relations as relations21 } from "drizzle-orm";
744
- import { boolean as boolean5, index as index21, pgTable as pgTable23, text as text23, timestamp as timestamp23 } from "drizzle-orm/pg-core";
745
- var announcements = pgTable23(
826
+ import { relations as relations23 } from "drizzle-orm";
827
+ import { boolean as boolean8, index as index23, pgTable as pgTable25, text as text25, timestamp as timestamp25 } from "drizzle-orm/pg-core";
828
+ var announcements = pgTable25(
746
829
  "announcements",
747
830
  {
748
- id: text23("id").primaryKey(),
749
- title: text23("title").notNull(),
750
- description: text23("description"),
751
- message: text23("message"),
752
- status: text23("status").notNull().default("published"),
753
- programId: text23("program_id").references(() => programs.id, { onDelete: "cascade" }),
754
- isAdmin: boolean5("is_admin").notNull().default(false),
755
- audienceAcademy: boolean5("audience_academy").notNull().default(false),
756
- audienceCompetition: boolean5("audience_competition").notNull().default(false),
757
- emailEnabled: boolean5("email_enabled").notNull().default(false),
758
- emailSent: boolean5("email_sent").notNull().default(false),
759
- emailSentAt: timestamp23("email_sent_at"),
760
- emailError: text23("email_error"),
761
- deletedAt: timestamp23("deleted_at"),
762
- createdAt: timestamp23("created_at").notNull().defaultNow(),
763
- updatedAt: timestamp23("updated_at").notNull().defaultNow()
831
+ id: text25("id").primaryKey(),
832
+ title: text25("title").notNull(),
833
+ description: text25("description"),
834
+ message: text25("message"),
835
+ status: text25("status").notNull().default("published"),
836
+ programId: text25("program_id").references(() => programs.id, { onDelete: "cascade" }),
837
+ isAdmin: boolean8("is_admin").notNull().default(false),
838
+ audienceAcademy: boolean8("audience_academy").notNull().default(false),
839
+ audienceCompetition: boolean8("audience_competition").notNull().default(false),
840
+ emailEnabled: boolean8("email_enabled").notNull().default(false),
841
+ emailSent: boolean8("email_sent").notNull().default(false),
842
+ emailSentAt: timestamp25("email_sent_at"),
843
+ emailError: text25("email_error"),
844
+ deletedAt: timestamp25("deleted_at"),
845
+ createdAt: timestamp25("created_at").notNull().defaultNow(),
846
+ updatedAt: timestamp25("updated_at").notNull().defaultNow()
764
847
  },
765
848
  (table) => [
766
- index21("announcements_program_id_idx").on(table.programId),
767
- index21("announcements_status_idx").on(table.status),
768
- index21("announcements_is_admin_idx").on(table.isAdmin)
849
+ index23("announcements_program_id_idx").on(table.programId),
850
+ index23("announcements_status_idx").on(table.status),
851
+ index23("announcements_is_admin_idx").on(table.isAdmin)
769
852
  ]
770
853
  );
771
- var announcementsRelations = relations21(announcements, ({ one }) => ({
854
+ var announcementsRelations = relations23(announcements, ({ one }) => ({
772
855
  program: one(programs, {
773
856
  fields: [announcements.programId],
774
857
  references: [programs.id]
@@ -776,69 +859,69 @@ var announcementsRelations = relations21(announcements, ({ one }) => ({
776
859
  }));
777
860
 
778
861
  // playground/leaderboard-history.schema.ts
779
- import { pgTable as pgTable24, timestamp as timestamp24, uuid } from "drizzle-orm/pg-core";
862
+ import { pgTable as pgTable26, timestamp as timestamp26, uuid } from "drizzle-orm/pg-core";
780
863
  import { jsonb as jsonb2 } from "drizzle-orm/pg-core";
781
- var leaderboardHistories = pgTable24("leaderboardHistories", {
864
+ var leaderboardHistories = pgTable26("leaderboardHistories", {
782
865
  id: uuid("id").primaryKey().defaultRandom(),
783
866
  jsonData: jsonb2("json_data").notNull(),
784
- createdAt: timestamp24("created_at").notNull().defaultNow(),
785
- updatedAt: timestamp24("updated_at").notNull().defaultNow()
867
+ createdAt: timestamp26("created_at").notNull().defaultNow(),
868
+ updatedAt: timestamp26("updated_at").notNull().defaultNow()
786
869
  });
787
870
 
788
871
  // playground/user-playground.schema.ts
789
- import { index as index22, pgTable as pgTable25, text as text24, timestamp as timestamp25, uuid as uuid2 } from "drizzle-orm/pg-core";
790
- var userPlaygrounds = pgTable25(
872
+ import { index as index24, pgTable as pgTable27, text as text26, timestamp as timestamp27, uuid as uuid2 } from "drizzle-orm/pg-core";
873
+ var userPlaygrounds = pgTable27(
791
874
  "userPlaygrounds",
792
875
  {
793
876
  id: uuid2("id").primaryKey().defaultRandom(),
794
- userId: text24("user_id").notNull().unique().references(() => users.id, { onDelete: "cascade" }),
795
- username: text24("username").notNull(),
796
- virtualPoint: text24("virtual_point").notNull().default("0"),
797
- mainEventCurrency: text24("main_event_currency").notNull().default("0"),
798
- deletedAt: timestamp25("deleted_at"),
799
- createdAt: timestamp25("created_at").notNull().defaultNow(),
800
- updatedAt: timestamp25("updated_at").notNull().defaultNow()
877
+ userId: text26("user_id").notNull().unique().references(() => users.id, { onDelete: "cascade" }),
878
+ username: text26("username").notNull(),
879
+ virtualPoint: text26("virtual_point").notNull().default("0"),
880
+ mainEventCurrency: text26("main_event_currency").notNull().default("0"),
881
+ deletedAt: timestamp27("deleted_at"),
882
+ createdAt: timestamp27("created_at").notNull().defaultNow(),
883
+ updatedAt: timestamp27("updated_at").notNull().defaultNow()
801
884
  },
802
- (table) => [index22("userPlaygrounds_userId_idx").on(table.userId)]
885
+ (table) => [index24("userPlaygrounds_userId_idx").on(table.userId)]
803
886
  );
804
887
 
805
888
  // playground/user-playground-detention.schema.ts
806
- import { boolean as boolean6, index as index23, pgTable as pgTable26, text as text25, timestamp as timestamp26, uuid as uuid3 } from "drizzle-orm/pg-core";
807
- var userPlaygroundDetentions = pgTable26(
889
+ import { boolean as boolean9, index as index25, pgTable as pgTable28, text as text27, timestamp as timestamp28, uuid as uuid3 } from "drizzle-orm/pg-core";
890
+ var userPlaygroundDetentions = pgTable28(
808
891
  "userPlaygroundDetentions",
809
892
  {
810
893
  id: uuid3("id").primaryKey().defaultRandom(),
811
894
  userPlaygroundId: uuid3("user_playground_id").notNull().unique().references(() => userPlaygrounds.id, { onDelete: "cascade" }),
812
- description: text25("description").notNull(),
813
- penaltyPoint: text25("penalty_point").notNull(),
895
+ description: text27("description").notNull(),
896
+ penaltyPoint: text27("penalty_point").notNull(),
814
897
  state: detentionStateEnum("state").notNull(),
815
- isRead: boolean6("is_read").notNull().default(false),
816
- deletedAt: timestamp26("deleted_at"),
817
- createdAt: timestamp26("created_at").notNull().defaultNow(),
818
- updatedAt: timestamp26("updated_at").notNull().defaultNow()
898
+ isRead: boolean9("is_read").notNull().default(false),
899
+ deletedAt: timestamp28("deleted_at"),
900
+ createdAt: timestamp28("created_at").notNull().defaultNow(),
901
+ updatedAt: timestamp28("updated_at").notNull().defaultNow()
819
902
  },
820
- (table) => [index23("userPlaygroundDetentions_userPlaygroundId_idx").on(table.userPlaygroundId)]
903
+ (table) => [index25("userPlaygroundDetentions_userPlaygroundId_idx").on(table.userPlaygroundId)]
821
904
  );
822
905
 
823
906
  // games/game.schema.ts
824
- import { relations as relations26 } from "drizzle-orm";
825
- import { boolean as boolean9, pgTable as pgTable31, text as text29, timestamp as timestamp31 } from "drizzle-orm/pg-core";
907
+ import { relations as relations28 } from "drizzle-orm";
908
+ import { boolean as boolean12, pgTable as pgTable33, text as text31, timestamp as timestamp33 } from "drizzle-orm/pg-core";
826
909
 
827
910
  // games/game-developer.schema.ts
828
- import { relations as relations22 } from "drizzle-orm";
829
- import { pgTable as pgTable27, text as text26, timestamp as timestamp27 } from "drizzle-orm/pg-core";
830
- var gameDevelopers = pgTable27("gameDevelopers", {
831
- id: text26("id").primaryKey(),
832
- gameId: text26("gameId").references(() => games.id, { onDelete: "cascade" }).notNull(),
833
- name: text26("name").notNull(),
834
- description: text26("description"),
835
- imageUrl: text26("imageUrl"),
836
- instagramUrl: text26("instagramUrl"),
837
- linkedInUrl: text26("linkedInUrl"),
838
- createdAt: timestamp27("createdAt").notNull().defaultNow(),
839
- updatedAt: timestamp27("updatedAt").notNull().defaultNow()
911
+ import { relations as relations24 } from "drizzle-orm";
912
+ import { pgTable as pgTable29, text as text28, timestamp as timestamp29 } from "drizzle-orm/pg-core";
913
+ var gameDevelopers = pgTable29("gameDevelopers", {
914
+ id: text28("id").primaryKey(),
915
+ gameId: text28("gameId").references(() => games.id, { onDelete: "cascade" }).notNull(),
916
+ name: text28("name").notNull(),
917
+ description: text28("description"),
918
+ imageUrl: text28("imageUrl"),
919
+ instagramUrl: text28("instagramUrl"),
920
+ linkedInUrl: text28("linkedInUrl"),
921
+ createdAt: timestamp29("createdAt").notNull().defaultNow(),
922
+ updatedAt: timestamp29("updatedAt").notNull().defaultNow()
840
923
  });
841
- var gameDevelopersRelations = relations22(gameDevelopers, ({ one }) => ({
924
+ var gameDevelopersRelations = relations24(gameDevelopers, ({ one }) => ({
842
925
  game: one(games, {
843
926
  fields: [gameDevelopers.gameId],
844
927
  references: [games.id]
@@ -846,17 +929,17 @@ var gameDevelopersRelations = relations22(gameDevelopers, ({ one }) => ({
846
929
  }));
847
930
 
848
931
  // games/game-rule.schema.ts
849
- import { relations as relations23 } from "drizzle-orm";
850
- import { pgTable as pgTable28, text as text27, timestamp as timestamp28 } from "drizzle-orm/pg-core";
851
- var gameRules = pgTable28("gameRules", {
852
- id: text27("id").primaryKey(),
853
- gameId: text27("gameId").references(() => games.id, { onDelete: "cascade" }).notNull(),
854
- title: text27("title").notNull(),
855
- rule: text27("rule").notNull(),
856
- createdAt: timestamp28("createdAt").notNull().defaultNow(),
857
- updatedAt: timestamp28("updatedAt").notNull().defaultNow()
932
+ import { relations as relations25 } from "drizzle-orm";
933
+ import { pgTable as pgTable30, text as text29, timestamp as timestamp30 } from "drizzle-orm/pg-core";
934
+ var gameRules = pgTable30("gameRules", {
935
+ id: text29("id").primaryKey(),
936
+ gameId: text29("gameId").references(() => games.id, { onDelete: "cascade" }).notNull(),
937
+ title: text29("title").notNull(),
938
+ rule: text29("rule").notNull(),
939
+ createdAt: timestamp30("createdAt").notNull().defaultNow(),
940
+ updatedAt: timestamp30("updatedAt").notNull().defaultNow()
858
941
  });
859
- var gameRulesRelations = relations23(gameRules, ({ one }) => ({
942
+ var gameRulesRelations = relations25(gameRules, ({ one }) => ({
860
943
  game: one(games, {
861
944
  fields: [gameRules.gameId],
862
945
  references: [games.id]
@@ -864,24 +947,24 @@ var gameRulesRelations = relations23(gameRules, ({ one }) => ({
864
947
  }));
865
948
 
866
949
  // games/user-play-game-history.schema.ts
867
- import { relations as relations25 } from "drizzle-orm";
868
- import { boolean as boolean8, pgTable as pgTable30, text as text28, timestamp as timestamp30, uuid as uuid5 } from "drizzle-orm/pg-core";
950
+ import { relations as relations27 } from "drizzle-orm";
951
+ import { boolean as boolean11, pgTable as pgTable32, text as text30, timestamp as timestamp32, uuid as uuid5 } from "drizzle-orm/pg-core";
869
952
 
870
953
  // tokens/playground-token.schema.ts
871
- import { relations as relations24 } from "drizzle-orm";
872
- import { boolean as boolean7, pgTable as pgTable29, timestamp as timestamp29, uuid as uuid4, varchar } from "drizzle-orm/pg-core";
873
- var playgroundTokens = pgTable29("playgroundTokens", {
954
+ import { relations as relations26 } from "drizzle-orm";
955
+ import { boolean as boolean10, pgTable as pgTable31, timestamp as timestamp31, uuid as uuid4, varchar } from "drizzle-orm/pg-core";
956
+ var playgroundTokens = pgTable31("playgroundTokens", {
874
957
  id: uuid4("id").primaryKey().defaultRandom(),
875
958
  userPlaygroundId: uuid4("userPlaygroundId").references(() => userPlaygrounds.id, { onDelete: "cascade" }).notNull(),
876
959
  code: varchar("code", { length: 6 }).notNull().unique(),
877
960
  tokenType: tokenTypeEnum("tokenType").notNull(),
878
- isUsed: boolean7("isUsed").notNull().default(false),
879
- usedAt: timestamp29("usedAt"),
880
- deletedAt: timestamp29("deletedAt"),
881
- createdAt: timestamp29("createdAt").notNull().defaultNow(),
882
- updatedAt: timestamp29("updatedAt").notNull().defaultNow()
961
+ isUsed: boolean10("isUsed").notNull().default(false),
962
+ usedAt: timestamp31("usedAt"),
963
+ deletedAt: timestamp31("deletedAt"),
964
+ createdAt: timestamp31("createdAt").notNull().defaultNow(),
965
+ updatedAt: timestamp31("updatedAt").notNull().defaultNow()
883
966
  });
884
- var playgroundTokensRelations = relations24(playgroundTokens, ({ one }) => ({
967
+ var playgroundTokensRelations = relations26(playgroundTokens, ({ one }) => ({
885
968
  userPlayground: one(userPlaygrounds, {
886
969
  fields: [playgroundTokens.userPlaygroundId],
887
970
  references: [userPlaygrounds.id]
@@ -889,19 +972,19 @@ var playgroundTokensRelations = relations24(playgroundTokens, ({ one }) => ({
889
972
  }));
890
973
 
891
974
  // games/user-play-game-history.schema.ts
892
- var userPlayGameHistories = pgTable30("userPlayGameHistories", {
893
- id: text28("id").primaryKey(),
975
+ var userPlayGameHistories = pgTable32("userPlayGameHistories", {
976
+ id: text30("id").primaryKey(),
894
977
  userPlaygroundId: uuid5("userPlaygroundId").references(() => userPlaygrounds.id, { onDelete: "cascade" }).notNull(),
895
- gameId: text28("gameId").references(() => games.id, { onDelete: "cascade" }).notNull(),
978
+ gameId: text30("gameId").references(() => games.id, { onDelete: "cascade" }).notNull(),
896
979
  tokenUsedId: uuid5("tokenUsedId").references(() => playgroundTokens.id, {
897
980
  onDelete: "set null"
898
981
  }),
899
- isFinished: boolean8("isFinished").notNull().default(false),
900
- finishedAt: timestamp30("finishedAt"),
901
- createdAt: timestamp30("createdAt").notNull().defaultNow(),
902
- updatedAt: timestamp30("updatedAt").notNull().defaultNow()
982
+ isFinished: boolean11("isFinished").notNull().default(false),
983
+ finishedAt: timestamp32("finishedAt"),
984
+ createdAt: timestamp32("createdAt").notNull().defaultNow(),
985
+ updatedAt: timestamp32("updatedAt").notNull().defaultNow()
903
986
  });
904
- var userPlayGameHistoriesRelations = relations25(userPlayGameHistories, ({ one }) => ({
987
+ var userPlayGameHistoriesRelations = relations27(userPlayGameHistories, ({ one }) => ({
905
988
  userPlayground: one(userPlaygrounds, {
906
989
  fields: [userPlayGameHistories.userPlaygroundId],
907
990
  references: [userPlaygrounds.id]
@@ -917,44 +1000,44 @@ var userPlayGameHistoriesRelations = relations25(userPlayGameHistories, ({ one }
917
1000
  }));
918
1001
 
919
1002
  // games/game.schema.ts
920
- var games = pgTable31("games", {
921
- id: text29("id").primaryKey(),
922
- name: text29("name").notNull(),
923
- arcadeCode: text29("arcadeCode").notNull().unique(),
924
- arcadeUrl: text29("arcadeUrl"),
925
- description: text29("description"),
926
- rules: text29("rules").array(),
927
- isGetPoint: boolean9("isGetPoint").notNull().default(false),
1003
+ var games = pgTable33("games", {
1004
+ id: text31("id").primaryKey(),
1005
+ name: text31("name").notNull(),
1006
+ arcadeCode: text31("arcadeCode").notNull().unique(),
1007
+ arcadeUrl: text31("arcadeUrl"),
1008
+ description: text31("description"),
1009
+ rules: text31("rules").array(),
1010
+ isGetPoint: boolean12("isGetPoint").notNull().default(false),
928
1011
  orientation: gameOrientationEnum("orientation").notNull().default("VERTICAL"),
929
- createdAt: timestamp31("createdAt").notNull().defaultNow(),
930
- updatedAt: timestamp31("updatedAt").notNull().defaultNow()
1012
+ createdAt: timestamp33("createdAt").notNull().defaultNow(),
1013
+ updatedAt: timestamp33("updatedAt").notNull().defaultNow()
931
1014
  });
932
- var gamesRelations = relations26(games, ({ many }) => ({
1015
+ var gamesRelations = relations28(games, ({ many }) => ({
933
1016
  gameRules: many(gameRules),
934
1017
  gameDevelopers: many(gameDevelopers),
935
1018
  userPlayGameHistories: many(userPlayGameHistories)
936
1019
  }));
937
1020
 
938
1021
  // tokens/playground-expense-history.schema.ts
939
- import { relations as relations27 } from "drizzle-orm";
940
- import { index as index24, integer as integer3, pgTable as pgTable32, text as text30, timestamp as timestamp32, uuid as uuid6 } from "drizzle-orm/pg-core";
941
- var playgroundExpenseHistories = pgTable32(
1022
+ import { relations as relations29 } from "drizzle-orm";
1023
+ import { index as index26, integer as integer4, pgTable as pgTable34, text as text32, timestamp as timestamp34, uuid as uuid6 } from "drizzle-orm/pg-core";
1024
+ var playgroundExpenseHistories = pgTable34(
942
1025
  "playgroundExpenseHistories",
943
1026
  {
944
- id: text30("id").primaryKey(),
1027
+ id: text32("id").primaryKey(),
945
1028
  userPlaygroundId: uuid6("userPlaygroundId").references(() => userPlaygrounds.id, {
946
1029
  onDelete: "cascade"
947
1030
  }),
948
- description: text30("description"),
949
- amount: integer3("amount").notNull(),
950
- createdAt: timestamp32("createdAt").notNull().defaultNow(),
951
- updatedAt: timestamp32("updatedAt").notNull().defaultNow()
1031
+ description: text32("description"),
1032
+ amount: integer4("amount").notNull(),
1033
+ createdAt: timestamp34("createdAt").notNull().defaultNow(),
1034
+ updatedAt: timestamp34("updatedAt").notNull().defaultNow()
952
1035
  },
953
1036
  (table) => [
954
- index24("playgroundExpenseHistories_userPlaygroundId_idx").on(table.userPlaygroundId)
1037
+ index26("playgroundExpenseHistories_userPlaygroundId_idx").on(table.userPlaygroundId)
955
1038
  ]
956
1039
  );
957
- var playgroundExpenseHistoriesRelations = relations27(
1040
+ var playgroundExpenseHistoriesRelations = relations29(
958
1041
  playgroundExpenseHistories,
959
1042
  ({ one }) => ({
960
1043
  userPlayground: one(userPlaygrounds, {
@@ -965,24 +1048,24 @@ var playgroundExpenseHistoriesRelations = relations27(
965
1048
  );
966
1049
 
967
1050
  // tokens/playground-reward-history.schema.ts
968
- import { relations as relations28 } from "drizzle-orm";
969
- import { index as index25, integer as integer4, pgTable as pgTable33, text as text31, timestamp as timestamp33, uuid as uuid7 } from "drizzle-orm/pg-core";
970
- var playgroundRewardHistories = pgTable33(
1051
+ import { relations as relations30 } from "drizzle-orm";
1052
+ import { index as index27, integer as integer5, pgTable as pgTable35, text as text33, timestamp as timestamp35, uuid as uuid7 } from "drizzle-orm/pg-core";
1053
+ var playgroundRewardHistories = pgTable35(
971
1054
  "playgroundRewardHistories",
972
1055
  {
973
- id: text31("id").primaryKey(),
1056
+ id: text33("id").primaryKey(),
974
1057
  userPlaygroundId: uuid7("userPlaygroundId").references(() => userPlaygrounds.id, {
975
1058
  onDelete: "cascade"
976
1059
  }),
977
- description: text31("description"),
1060
+ description: text33("description"),
978
1061
  rewardType: rewardTypeEnum("rewardType").notNull(),
979
- amount: integer4("amount").notNull(),
980
- createdAt: timestamp33("createdAt").notNull().defaultNow(),
981
- updatedAt: timestamp33("updatedAt").notNull().defaultNow()
1062
+ amount: integer5("amount").notNull(),
1063
+ createdAt: timestamp35("createdAt").notNull().defaultNow(),
1064
+ updatedAt: timestamp35("updatedAt").notNull().defaultNow()
982
1065
  },
983
- (table) => [index25("playgroundRewardHistories_userPlaygroundId_idx").on(table.userPlaygroundId)]
1066
+ (table) => [index27("playgroundRewardHistories_userPlaygroundId_idx").on(table.userPlaygroundId)]
984
1067
  );
985
- var playgroundRewardHistoriesRelations = relations28(
1068
+ var playgroundRewardHistoriesRelations = relations30(
986
1069
  playgroundRewardHistories,
987
1070
  ({ one }) => ({
988
1071
  userPlayground: one(userPlaygrounds, {
@@ -993,33 +1076,33 @@ var playgroundRewardHistoriesRelations = relations28(
993
1076
  );
994
1077
 
995
1078
  // ads/ad-watch-history.schema.ts
996
- import { relations as relations29 } from "drizzle-orm";
997
- import { pgTable as pgTable35, text as text33, timestamp as timestamp35, uuid as uuid8 } from "drizzle-orm/pg-core";
1079
+ import { relations as relations31 } from "drizzle-orm";
1080
+ import { pgTable as pgTable37, text as text35, timestamp as timestamp37, uuid as uuid8 } from "drizzle-orm/pg-core";
998
1081
 
999
1082
  // ads/advertisement.schema.ts
1000
- import { boolean as boolean10, integer as integer5, pgTable as pgTable34, text as text32, timestamp as timestamp34 } from "drizzle-orm/pg-core";
1001
- var advertisements = pgTable34("advertisements", {
1002
- id: text32("id").primaryKey(),
1003
- contentUrl: text32("contentUrl").notNull(),
1004
- isVideo: boolean10("isVideo").notNull().default(false),
1005
- contentLength: integer5("contentLength"),
1006
- createdAt: timestamp34("createdAt").notNull().defaultNow(),
1007
- updatedAt: timestamp34("updatedAt").notNull().defaultNow()
1083
+ import { boolean as boolean13, integer as integer6, pgTable as pgTable36, text as text34, timestamp as timestamp36 } from "drizzle-orm/pg-core";
1084
+ var advertisements = pgTable36("advertisements", {
1085
+ id: text34("id").primaryKey(),
1086
+ contentUrl: text34("contentUrl").notNull(),
1087
+ isVideo: boolean13("isVideo").notNull().default(false),
1088
+ contentLength: integer6("contentLength"),
1089
+ createdAt: timestamp36("createdAt").notNull().defaultNow(),
1090
+ updatedAt: timestamp36("updatedAt").notNull().defaultNow()
1008
1091
  });
1009
1092
 
1010
1093
  // ads/ad-watch-history.schema.ts
1011
- var adWatchHistories = pgTable35("adWatchHistories", {
1012
- id: text33("id").primaryKey(),
1094
+ var adWatchHistories = pgTable37("adWatchHistories", {
1095
+ id: text35("id").primaryKey(),
1013
1096
  userPlaygroundId: uuid8("userPlaygroundId").references(() => userPlaygrounds.id, {
1014
1097
  onDelete: "cascade"
1015
1098
  }),
1016
- adId: text33("adId").references(() => advertisements.id, { onDelete: "cascade" }),
1017
- referer: text33("referer"),
1018
- watchedAt: timestamp35("watchedAt").notNull(),
1019
- createdAt: timestamp35("createdAt").notNull().defaultNow(),
1020
- updatedAt: timestamp35("updatedAt").notNull().defaultNow()
1099
+ adId: text35("adId").references(() => advertisements.id, { onDelete: "cascade" }),
1100
+ referer: text35("referer"),
1101
+ watchedAt: timestamp37("watchedAt").notNull(),
1102
+ createdAt: timestamp37("createdAt").notNull().defaultNow(),
1103
+ updatedAt: timestamp37("updatedAt").notNull().defaultNow()
1021
1104
  });
1022
- var adWatchHistoriesRelations = relations29(adWatchHistories, ({ one }) => ({
1105
+ var adWatchHistoriesRelations = relations31(adWatchHistories, ({ one }) => ({
1023
1106
  userPlayground: one(userPlaygrounds, {
1024
1107
  fields: [adWatchHistories.userPlaygroundId],
1025
1108
  references: [userPlaygrounds.id]
@@ -1031,22 +1114,22 @@ var adWatchHistoriesRelations = relations29(adWatchHistories, ({ one }) => ({
1031
1114
  }));
1032
1115
 
1033
1116
  // ads/ad-watch-session.schema.ts
1034
- import { relations as relations30 } from "drizzle-orm";
1035
- import { integer as integer6, pgTable as pgTable36, text as text34, timestamp as timestamp36, uuid as uuid9 } from "drizzle-orm/pg-core";
1036
- var adWatchSessions = pgTable36("adWatchSessions", {
1037
- id: text34("id").primaryKey(),
1117
+ import { relations as relations32 } from "drizzle-orm";
1118
+ import { integer as integer7, pgTable as pgTable38, text as text36, timestamp as timestamp38, uuid as uuid9 } from "drizzle-orm/pg-core";
1119
+ var adWatchSessions = pgTable38("adWatchSessions", {
1120
+ id: text36("id").primaryKey(),
1038
1121
  userPlaygroundId: uuid9("userPlaygroundId").references(() => userPlaygrounds.id, {
1039
1122
  onDelete: "cascade"
1040
1123
  }),
1041
- adId: text34("adId").references(() => advertisements.id, { onDelete: "cascade" }),
1042
- adLength: integer6("adLength"),
1043
- startTimeUnix: integer6("startTimeUnix").notNull(),
1044
- lockUntil: integer6("lockUntil"),
1045
- finishedAt: timestamp36("finishedAt"),
1046
- createdAt: timestamp36("createdAt").notNull().defaultNow(),
1047
- updatedAt: timestamp36("updatedAt").notNull().defaultNow()
1124
+ adId: text36("adId").references(() => advertisements.id, { onDelete: "cascade" }),
1125
+ adLength: integer7("adLength"),
1126
+ startTimeUnix: integer7("startTimeUnix").notNull(),
1127
+ lockUntil: integer7("lockUntil"),
1128
+ finishedAt: timestamp38("finishedAt"),
1129
+ createdAt: timestamp38("createdAt").notNull().defaultNow(),
1130
+ updatedAt: timestamp38("updatedAt").notNull().defaultNow()
1048
1131
  });
1049
- var adWatchSessionsRelations = relations30(adWatchSessions, ({ one }) => ({
1132
+ var adWatchSessionsRelations = relations32(adWatchSessions, ({ one }) => ({
1050
1133
  userPlayground: one(userPlaygrounds, {
1051
1134
  fields: [adWatchSessions.userPlaygroundId],
1052
1135
  references: [userPlaygrounds.id]
@@ -1058,29 +1141,29 @@ var adWatchSessionsRelations = relations30(adWatchSessions, ({ one }) => ({
1058
1141
  }));
1059
1142
 
1060
1143
  // quiz/main-event-mini-quiz.schema.ts
1061
- import { relations as relations34 } from "drizzle-orm";
1062
- import { index as index29, pgTable as pgTable40, text as text38, timestamp as timestamp40 } from "drizzle-orm/pg-core";
1144
+ import { relations as relations36 } from "drizzle-orm";
1145
+ import { index as index31, pgTable as pgTable42, text as text40, timestamp as timestamp42 } from "drizzle-orm/pg-core";
1063
1146
 
1064
1147
  // quiz/main-event-mini-quiz-attempt.schema.ts
1065
- import { relations as relations31 } from "drizzle-orm";
1066
- import { index as index26, json, pgTable as pgTable37, text as text35, timestamp as timestamp37 } from "drizzle-orm/pg-core";
1067
- var mainEventMiniQuizAttempts = pgTable37(
1148
+ import { relations as relations33 } from "drizzle-orm";
1149
+ import { index as index28, json, pgTable as pgTable39, text as text37, timestamp as timestamp39 } from "drizzle-orm/pg-core";
1150
+ var mainEventMiniQuizAttempts = pgTable39(
1068
1151
  "mainEventMiniQuizAttempts",
1069
1152
  {
1070
- id: text35("id").primaryKey(),
1071
- quizId: text35("quizId").references(() => mainEventMiniQuizzes.id, { onDelete: "cascade" }),
1072
- userId: text35("userId").references(() => users.id, { onDelete: "cascade" }),
1153
+ id: text37("id").primaryKey(),
1154
+ quizId: text37("quizId").references(() => mainEventMiniQuizzes.id, { onDelete: "cascade" }),
1155
+ userId: text37("userId").references(() => users.id, { onDelete: "cascade" }),
1073
1156
  answerJson: json("answerJson"),
1074
- attemptedAt: timestamp37("attemptedAt"),
1075
- createdAt: timestamp37("createdAt").notNull().defaultNow(),
1076
- updatedAt: timestamp37("updatedAt").notNull().defaultNow()
1157
+ attemptedAt: timestamp39("attemptedAt"),
1158
+ createdAt: timestamp39("createdAt").notNull().defaultNow(),
1159
+ updatedAt: timestamp39("updatedAt").notNull().defaultNow()
1077
1160
  },
1078
1161
  (table) => [
1079
- index26("mainEventMiniQuizAttempts_quizId_idx").on(table.quizId),
1080
- index26("mainEventMiniQuizAttempts_userId_idx").on(table.userId)
1162
+ index28("mainEventMiniQuizAttempts_quizId_idx").on(table.quizId),
1163
+ index28("mainEventMiniQuizAttempts_userId_idx").on(table.userId)
1081
1164
  ]
1082
1165
  );
1083
- var mainEventMiniQuizAttemptsRelations = relations31(
1166
+ var mainEventMiniQuizAttemptsRelations = relations33(
1084
1167
  mainEventMiniQuizAttempts,
1085
1168
  ({ one }) => ({
1086
1169
  quiz: one(mainEventMiniQuizzes, {
@@ -1095,27 +1178,27 @@ var mainEventMiniQuizAttemptsRelations = relations31(
1095
1178
  );
1096
1179
 
1097
1180
  // quiz/main-event-mini-quiz-question.schema.ts
1098
- import { relations as relations33 } from "drizzle-orm";
1099
- import { index as index28, pgTable as pgTable39, text as text37, timestamp as timestamp39 } from "drizzle-orm/pg-core";
1181
+ import { relations as relations35 } from "drizzle-orm";
1182
+ import { index as index30, pgTable as pgTable41, text as text39, timestamp as timestamp41 } from "drizzle-orm/pg-core";
1100
1183
 
1101
1184
  // quiz/main-event-mini-quiz-question-option.schema.ts
1102
- import { relations as relations32 } from "drizzle-orm";
1103
- import { boolean as boolean11, index as index27, pgTable as pgTable38, text as text36, timestamp as timestamp38 } from "drizzle-orm/pg-core";
1104
- var mainEventMiniQuizQuestionOptions = pgTable38(
1185
+ import { relations as relations34 } from "drizzle-orm";
1186
+ import { boolean as boolean14, index as index29, pgTable as pgTable40, text as text38, timestamp as timestamp40 } from "drizzle-orm/pg-core";
1187
+ var mainEventMiniQuizQuestionOptions = pgTable40(
1105
1188
  "mainEventMiniQuizQuestionOptions",
1106
1189
  {
1107
- id: text36("id").primaryKey(),
1108
- questionId: text36("questionId").references(() => mainEventMiniQuizQuestions.id, {
1190
+ id: text38("id").primaryKey(),
1191
+ questionId: text38("questionId").references(() => mainEventMiniQuizQuestions.id, {
1109
1192
  onDelete: "cascade"
1110
1193
  }),
1111
- option: text36("option").notNull(),
1112
- isAnswer: boolean11("isAnswer").notNull().default(false),
1113
- createdAt: timestamp38("createdAt").notNull().defaultNow(),
1114
- updatedAt: timestamp38("updatedAt").notNull().defaultNow()
1194
+ option: text38("option").notNull(),
1195
+ isAnswer: boolean14("isAnswer").notNull().default(false),
1196
+ createdAt: timestamp40("createdAt").notNull().defaultNow(),
1197
+ updatedAt: timestamp40("updatedAt").notNull().defaultNow()
1115
1198
  },
1116
- (table) => [index27("mainEventMiniQuizQuestionOptions_questionId_idx").on(table.questionId)]
1199
+ (table) => [index29("mainEventMiniQuizQuestionOptions_questionId_idx").on(table.questionId)]
1117
1200
  );
1118
- var mainEventMiniQuizQuestionOptionsRelations = relations32(
1201
+ var mainEventMiniQuizQuestionOptionsRelations = relations34(
1119
1202
  mainEventMiniQuizQuestionOptions,
1120
1203
  ({ one }) => ({
1121
1204
  question: one(mainEventMiniQuizQuestions, {
@@ -1126,18 +1209,18 @@ var mainEventMiniQuizQuestionOptionsRelations = relations32(
1126
1209
  );
1127
1210
 
1128
1211
  // quiz/main-event-mini-quiz-question.schema.ts
1129
- var mainEventMiniQuizQuestions = pgTable39(
1212
+ var mainEventMiniQuizQuestions = pgTable41(
1130
1213
  "mainEventMiniQuizQuestions",
1131
1214
  {
1132
- id: text37("id").primaryKey(),
1133
- quizId: text37("quizId").references(() => mainEventMiniQuizzes.id, { onDelete: "cascade" }),
1134
- question: text37("question").notNull(),
1135
- createdAt: timestamp39("createdAt").notNull().defaultNow(),
1136
- updatedAt: timestamp39("updatedAt").notNull().defaultNow()
1215
+ id: text39("id").primaryKey(),
1216
+ quizId: text39("quizId").references(() => mainEventMiniQuizzes.id, { onDelete: "cascade" }),
1217
+ question: text39("question").notNull(),
1218
+ createdAt: timestamp41("createdAt").notNull().defaultNow(),
1219
+ updatedAt: timestamp41("updatedAt").notNull().defaultNow()
1137
1220
  },
1138
- (table) => [index28("mainEventMiniQuizQuestions_quizId_idx").on(table.quizId)]
1221
+ (table) => [index30("mainEventMiniQuizQuestions_quizId_idx").on(table.quizId)]
1139
1222
  );
1140
- var mainEventMiniQuizQuestionsRelations = relations33(
1223
+ var mainEventMiniQuizQuestionsRelations = relations35(
1141
1224
  mainEventMiniQuizQuestions,
1142
1225
  ({ one, many }) => ({
1143
1226
  quiz: one(mainEventMiniQuizzes, {
@@ -1149,45 +1232,45 @@ var mainEventMiniQuizQuestionsRelations = relations33(
1149
1232
  );
1150
1233
 
1151
1234
  // quiz/main-event-mini-quiz.schema.ts
1152
- var mainEventMiniQuizzes = pgTable40(
1235
+ var mainEventMiniQuizzes = pgTable42(
1153
1236
  "mainEventMiniQuizzes",
1154
1237
  {
1155
- id: text38("id").primaryKey(),
1156
- quizName: text38("quizName").notNull(),
1157
- createdAt: timestamp40("createdAt").notNull().defaultNow(),
1158
- updatedAt: timestamp40("updatedAt").notNull().defaultNow()
1238
+ id: text40("id").primaryKey(),
1239
+ quizName: text40("quizName").notNull(),
1240
+ createdAt: timestamp42("createdAt").notNull().defaultNow(),
1241
+ updatedAt: timestamp42("updatedAt").notNull().defaultNow()
1159
1242
  },
1160
- (table) => [index29("mainEventMiniQuizzes_quizName_idx").on(table.quizName)]
1243
+ (table) => [index31("mainEventMiniQuizzes_quizName_idx").on(table.quizName)]
1161
1244
  );
1162
- var mainEventMiniQuizzesRelations = relations34(mainEventMiniQuizzes, ({ many }) => ({
1245
+ var mainEventMiniQuizzesRelations = relations36(mainEventMiniQuizzes, ({ many }) => ({
1163
1246
  questions: many(mainEventMiniQuizQuestions),
1164
1247
  attempts: many(mainEventMiniQuizAttempts)
1165
1248
  }));
1166
1249
 
1167
1250
  // quiz/mini-quiz.schema.ts
1168
- import { relations as relations37 } from "drizzle-orm";
1169
- import { index as index32, pgTable as pgTable43, text as text41, timestamp as timestamp43 } from "drizzle-orm/pg-core";
1251
+ import { relations as relations39 } from "drizzle-orm";
1252
+ import { index as index34, pgTable as pgTable45, text as text43, timestamp as timestamp45 } from "drizzle-orm/pg-core";
1170
1253
 
1171
1254
  // quiz/mini-quiz-attempt.schema.ts
1172
- import { relations as relations35 } from "drizzle-orm";
1173
- import { index as index30, json as json2, pgTable as pgTable41, text as text39, timestamp as timestamp41 } from "drizzle-orm/pg-core";
1174
- var miniQuizAttempts = pgTable41(
1255
+ import { relations as relations37 } from "drizzle-orm";
1256
+ import { index as index32, json as json2, pgTable as pgTable43, text as text41, timestamp as timestamp43 } from "drizzle-orm/pg-core";
1257
+ var miniQuizAttempts = pgTable43(
1175
1258
  "miniQuizAttempts",
1176
1259
  {
1177
- id: text39("id").primaryKey(),
1178
- quizId: text39("quizId").references(() => miniQuizzes.id, { onDelete: "cascade" }),
1179
- userId: text39("userId").references(() => users.id, { onDelete: "cascade" }),
1260
+ id: text41("id").primaryKey(),
1261
+ quizId: text41("quizId").references(() => miniQuizzes.id, { onDelete: "cascade" }),
1262
+ userId: text41("userId").references(() => users.id, { onDelete: "cascade" }),
1180
1263
  answerJson: json2("answerJson"),
1181
- attemptedAt: timestamp41("attemptedAt"),
1182
- createdAt: timestamp41("createdAt").notNull().defaultNow(),
1183
- updatedAt: timestamp41("updatedAt").notNull().defaultNow()
1264
+ attemptedAt: timestamp43("attemptedAt"),
1265
+ createdAt: timestamp43("createdAt").notNull().defaultNow(),
1266
+ updatedAt: timestamp43("updatedAt").notNull().defaultNow()
1184
1267
  },
1185
1268
  (table) => [
1186
- index30("miniQuizAttempts_quizId_idx").on(table.quizId),
1187
- index30("miniQuizAttempts_userId_idx").on(table.userId)
1269
+ index32("miniQuizAttempts_quizId_idx").on(table.quizId),
1270
+ index32("miniQuizAttempts_userId_idx").on(table.userId)
1188
1271
  ]
1189
1272
  );
1190
- var miniQuizAttemptsRelations = relations35(miniQuizAttempts, ({ one }) => ({
1273
+ var miniQuizAttemptsRelations = relations37(miniQuizAttempts, ({ one }) => ({
1191
1274
  quiz: one(miniQuizzes, {
1192
1275
  fields: [miniQuizAttempts.quizId],
1193
1276
  references: [miniQuizzes.id]
@@ -1199,21 +1282,21 @@ var miniQuizAttemptsRelations = relations35(miniQuizAttempts, ({ one }) => ({
1199
1282
  }));
1200
1283
 
1201
1284
  // quiz/mini-quiz-question.schema.ts
1202
- import { relations as relations36 } from "drizzle-orm";
1203
- import { boolean as boolean12, index as index31, pgTable as pgTable42, text as text40, timestamp as timestamp42 } from "drizzle-orm/pg-core";
1204
- var miniQuizQuestions = pgTable42(
1285
+ import { relations as relations38 } from "drizzle-orm";
1286
+ import { boolean as boolean15, index as index33, pgTable as pgTable44, text as text42, timestamp as timestamp44 } from "drizzle-orm/pg-core";
1287
+ var miniQuizQuestions = pgTable44(
1205
1288
  "miniQuizQuestions",
1206
1289
  {
1207
- id: text40("id").primaryKey(),
1208
- quizId: text40("quizId").references(() => miniQuizzes.id, { onDelete: "cascade" }),
1209
- question: text40("question").notNull(),
1210
- isTrue: boolean12("isTrue"),
1211
- createdAt: timestamp42("createdAt").notNull().defaultNow(),
1212
- updatedAt: timestamp42("updatedAt").notNull().defaultNow()
1290
+ id: text42("id").primaryKey(),
1291
+ quizId: text42("quizId").references(() => miniQuizzes.id, { onDelete: "cascade" }),
1292
+ question: text42("question").notNull(),
1293
+ isTrue: boolean15("isTrue"),
1294
+ createdAt: timestamp44("createdAt").notNull().defaultNow(),
1295
+ updatedAt: timestamp44("updatedAt").notNull().defaultNow()
1213
1296
  },
1214
- (table) => [index31("miniQuizQuestions_quizId_idx").on(table.quizId)]
1297
+ (table) => [index33("miniQuizQuestions_quizId_idx").on(table.quizId)]
1215
1298
  );
1216
- var miniQuizQuestionsRelations = relations36(miniQuizQuestions, ({ one }) => ({
1299
+ var miniQuizQuestionsRelations = relations38(miniQuizQuestions, ({ one }) => ({
1217
1300
  quiz: one(miniQuizzes, {
1218
1301
  fields: [miniQuizQuestions.quizId],
1219
1302
  references: [miniQuizzes.id]
@@ -1221,69 +1304,69 @@ var miniQuizQuestionsRelations = relations36(miniQuizQuestions, ({ one }) => ({
1221
1304
  }));
1222
1305
 
1223
1306
  // quiz/mini-quiz.schema.ts
1224
- var miniQuizzes = pgTable43(
1307
+ var miniQuizzes = pgTable45(
1225
1308
  "miniQuizzes",
1226
1309
  {
1227
- id: text41("id").primaryKey(),
1228
- quizName: text41("quizName").notNull(),
1229
- createdAt: timestamp43("createdAt").notNull().defaultNow(),
1230
- updatedAt: timestamp43("updatedAt").notNull().defaultNow()
1310
+ id: text43("id").primaryKey(),
1311
+ quizName: text43("quizName").notNull(),
1312
+ createdAt: timestamp45("createdAt").notNull().defaultNow(),
1313
+ updatedAt: timestamp45("updatedAt").notNull().defaultNow()
1231
1314
  },
1232
- (table) => [index32("miniQuizzes_quizName_idx").on(table.quizName)]
1315
+ (table) => [index34("miniQuizzes_quizName_idx").on(table.quizName)]
1233
1316
  );
1234
- var miniQuizzesRelations = relations37(miniQuizzes, ({ many }) => ({
1317
+ var miniQuizzesRelations = relations39(miniQuizzes, ({ many }) => ({
1235
1318
  questions: many(miniQuizQuestions),
1236
1319
  attempts: many(miniQuizAttempts)
1237
1320
  }));
1238
1321
 
1239
1322
  // exhibition/company-exhibition.schema.ts
1240
- import { pgTable as pgTable44, text as text42, timestamp as timestamp44 } from "drizzle-orm/pg-core";
1241
- var companyExhibitions = pgTable44("companyExhibitions", {
1242
- id: text42("id").primaryKey(),
1243
- name: text42("name").notNull(),
1244
- location: text42("location"),
1245
- iconUrl: text42("iconUrl"),
1246
- description: text42("description"),
1247
- tags: text42("tags"),
1248
- benefits: text42("benefits"),
1249
- vision: text42("vision"),
1250
- mission: text42("mission"),
1251
- documentationLinks: text42("documentationLinks"),
1252
- websiteLink: text42("websiteLink"),
1253
- createdAt: timestamp44("createdAt").notNull().defaultNow(),
1254
- updatedAt: timestamp44("updatedAt").notNull().defaultNow()
1323
+ import { pgTable as pgTable46, text as text44, timestamp as timestamp46 } from "drizzle-orm/pg-core";
1324
+ var companyExhibitions = pgTable46("companyExhibitions", {
1325
+ id: text44("id").primaryKey(),
1326
+ name: text44("name").notNull(),
1327
+ location: text44("location"),
1328
+ iconUrl: text44("iconUrl"),
1329
+ description: text44("description"),
1330
+ tags: text44("tags"),
1331
+ benefits: text44("benefits"),
1332
+ vision: text44("vision"),
1333
+ mission: text44("mission"),
1334
+ documentationLinks: text44("documentationLinks"),
1335
+ websiteLink: text44("websiteLink"),
1336
+ createdAt: timestamp46("createdAt").notNull().defaultNow(),
1337
+ updatedAt: timestamp46("updatedAt").notNull().defaultNow()
1255
1338
  });
1256
1339
 
1257
1340
  // exhibition/company-exhibition-vacancies.schema.ts
1258
- import { relations as relations38 } from "drizzle-orm";
1259
- import { boolean as boolean13, index as index33, pgTable as pgTable45, text as text43, timestamp as timestamp45 } from "drizzle-orm/pg-core";
1260
- var companyExhibitionVacancies = pgTable45(
1341
+ import { relations as relations40 } from "drizzle-orm";
1342
+ import { boolean as boolean16, index as index35, pgTable as pgTable47, text as text45, timestamp as timestamp47 } from "drizzle-orm/pg-core";
1343
+ var companyExhibitionVacancies = pgTable47(
1261
1344
  "companyExhibitionVacancies",
1262
1345
  {
1263
- id: text43("id").primaryKey(),
1264
- companyExhibitionId: text43("companyExhibitionId").references(() => companyExhibitions.id, {
1346
+ id: text45("id").primaryKey(),
1347
+ companyExhibitionId: text45("companyExhibitionId").references(() => companyExhibitions.id, {
1265
1348
  onDelete: "cascade"
1266
1349
  }),
1267
- position: text43("position").notNull(),
1268
- tags: text43("tags"),
1269
- description: text43("description"),
1270
- benefits: text43("benefits"),
1350
+ position: text45("position").notNull(),
1351
+ tags: text45("tags"),
1352
+ description: text45("description"),
1353
+ benefits: text45("benefits"),
1271
1354
  jobType: vacancyJobTypeEnum("jobType"),
1272
- salary: text43("salary"),
1273
- deadline: timestamp45("deadline"),
1274
- responsibilities: text43("responsibilities"),
1275
- requirements: text43("requirements"),
1276
- vacancyUrl: text43("vacancyUrl"),
1277
- isOpen: boolean13("isOpen").notNull().default(true),
1278
- createdAt: timestamp45("createdAt").notNull().defaultNow(),
1279
- updatedAt: timestamp45("updatedAt").notNull().defaultNow()
1355
+ salary: text45("salary"),
1356
+ deadline: timestamp47("deadline"),
1357
+ responsibilities: text45("responsibilities"),
1358
+ requirements: text45("requirements"),
1359
+ vacancyUrl: text45("vacancyUrl"),
1360
+ isOpen: boolean16("isOpen").notNull().default(true),
1361
+ createdAt: timestamp47("createdAt").notNull().defaultNow(),
1362
+ updatedAt: timestamp47("updatedAt").notNull().defaultNow()
1280
1363
  },
1281
1364
  (table) => [
1282
- index33("companyExhibitionVacancies_companyExhibitionId_idx").on(table.companyExhibitionId),
1283
- index33("companyExhibitionVacancies_isOpen_idx").on(table.isOpen)
1365
+ index35("companyExhibitionVacancies_companyExhibitionId_idx").on(table.companyExhibitionId),
1366
+ index35("companyExhibitionVacancies_isOpen_idx").on(table.isOpen)
1284
1367
  ]
1285
1368
  );
1286
- var companyExhibitionVacanciesRelations = relations38(
1369
+ var companyExhibitionVacanciesRelations = relations40(
1287
1370
  companyExhibitionVacancies,
1288
1371
  ({ one }) => ({
1289
1372
  companyExhibition: one(companyExhibitions, {
@@ -1294,33 +1377,33 @@ var companyExhibitionVacanciesRelations = relations38(
1294
1377
  );
1295
1378
 
1296
1379
  // jobfair/walk-in-interview-applicant.schema.ts
1297
- import { relations as relations41 } from "drizzle-orm";
1298
- import { index as index35, pgTable as pgTable48, text as text46, timestamp as timestamp48, uniqueIndex as uniqueIndex2 } from "drizzle-orm/pg-core";
1380
+ import { relations as relations43 } from "drizzle-orm";
1381
+ import { index as index37, pgTable as pgTable50, text as text48, timestamp as timestamp50, uniqueIndex as uniqueIndex3 } from "drizzle-orm/pg-core";
1299
1382
 
1300
1383
  // jobfair/walk-in-interview-company-slot.schema.ts
1301
- import { relations as relations40 } from "drizzle-orm";
1302
- import { boolean as boolean14, index as index34, pgTable as pgTable47, text as text45, timestamp as timestamp47 } from "drizzle-orm/pg-core";
1384
+ import { relations as relations42 } from "drizzle-orm";
1385
+ import { boolean as boolean17, index as index36, pgTable as pgTable49, text as text47, timestamp as timestamp49 } from "drizzle-orm/pg-core";
1303
1386
 
1304
1387
  // jobfair/walk-in-interview-company.schema.ts
1305
- import { relations as relations39 } from "drizzle-orm";
1306
- import { integer as integer7, pgTable as pgTable46, text as text44, timestamp as timestamp46 } from "drizzle-orm/pg-core";
1307
- var walkInInterviewCompanies = pgTable46("walkInInterviewCompanies", {
1308
- id: text44("id").primaryKey(),
1309
- name: text44("name").notNull(),
1310
- description: text44("description"),
1311
- iconUrl: text44("iconUrl"),
1312
- slots: integer7("slots"),
1313
- session: text44("session"),
1314
- roles: text44("roles"),
1315
- tags: text44("tags"),
1316
- benefits: text44("benefits"),
1317
- criteria: text44("criteria"),
1318
- currentApplicants: integer7("currentApplicants"),
1319
- boothLocation: text44("boothLocation"),
1320
- createdAt: timestamp46("createdAt").notNull().defaultNow(),
1321
- updatedAt: timestamp46("updatedAt").notNull().defaultNow()
1388
+ import { relations as relations41 } from "drizzle-orm";
1389
+ import { integer as integer8, pgTable as pgTable48, text as text46, timestamp as timestamp48 } from "drizzle-orm/pg-core";
1390
+ var walkInInterviewCompanies = pgTable48("walkInInterviewCompanies", {
1391
+ id: text46("id").primaryKey(),
1392
+ name: text46("name").notNull(),
1393
+ description: text46("description"),
1394
+ iconUrl: text46("iconUrl"),
1395
+ slots: integer8("slots"),
1396
+ session: text46("session"),
1397
+ roles: text46("roles"),
1398
+ tags: text46("tags"),
1399
+ benefits: text46("benefits"),
1400
+ criteria: text46("criteria"),
1401
+ currentApplicants: integer8("currentApplicants"),
1402
+ boothLocation: text46("boothLocation"),
1403
+ createdAt: timestamp48("createdAt").notNull().defaultNow(),
1404
+ updatedAt: timestamp48("updatedAt").notNull().defaultNow()
1322
1405
  });
1323
- var walkInInterviewCompaniesRelations = relations39(
1406
+ var walkInInterviewCompaniesRelations = relations41(
1324
1407
  walkInInterviewCompanies,
1325
1408
  ({ many }) => ({
1326
1409
  slots: many(walkInInterviewCompanySlots)
@@ -1328,22 +1411,22 @@ var walkInInterviewCompaniesRelations = relations39(
1328
1411
  );
1329
1412
 
1330
1413
  // jobfair/walk-in-interview-company-slot.schema.ts
1331
- var walkInInterviewCompanySlots = pgTable47(
1414
+ var walkInInterviewCompanySlots = pgTable49(
1332
1415
  "walkInInterviewCompanySlots",
1333
1416
  {
1334
- id: text45("id").primaryKey(),
1335
- companyId: text45("companyId").references(() => walkInInterviewCompanies.id, {
1417
+ id: text47("id").primaryKey(),
1418
+ companyId: text47("companyId").references(() => walkInInterviewCompanies.id, {
1336
1419
  onDelete: "cascade"
1337
1420
  }),
1338
- startTime: timestamp47("startTime").notNull(),
1339
- endTime: timestamp47("endTime").notNull(),
1340
- isAvailable: boolean14("isAvailable").notNull().default(true),
1341
- createdAt: timestamp47("createdAt").notNull().defaultNow(),
1342
- updatedAt: timestamp47("updatedAt").notNull().defaultNow()
1421
+ startTime: timestamp49("startTime").notNull(),
1422
+ endTime: timestamp49("endTime").notNull(),
1423
+ isAvailable: boolean17("isAvailable").notNull().default(true),
1424
+ createdAt: timestamp49("createdAt").notNull().defaultNow(),
1425
+ updatedAt: timestamp49("updatedAt").notNull().defaultNow()
1343
1426
  },
1344
- (table) => [index34("walkInInterviewCompanySlots_companyId_idx").on(table.companyId)]
1427
+ (table) => [index36("walkInInterviewCompanySlots_companyId_idx").on(table.companyId)]
1345
1428
  );
1346
- var walkInInterviewCompanySlotsRelations = relations40(
1429
+ var walkInInterviewCompanySlotsRelations = relations42(
1347
1430
  walkInInterviewCompanySlots,
1348
1431
  ({ one, many }) => ({
1349
1432
  company: one(walkInInterviewCompanies, {
@@ -1355,30 +1438,30 @@ var walkInInterviewCompanySlotsRelations = relations40(
1355
1438
  );
1356
1439
 
1357
1440
  // jobfair/walk-in-interview-applicant.schema.ts
1358
- var walkInInterviewApplicants = pgTable48(
1441
+ var walkInInterviewApplicants = pgTable50(
1359
1442
  "walkInInterviewApplicants",
1360
1443
  {
1361
- id: text46("id").primaryKey(),
1362
- userId: text46("userId").references(() => users.id, { onDelete: "cascade" }),
1363
- resumeUrl: text46("resumeUrl"),
1444
+ id: text48("id").primaryKey(),
1445
+ userId: text48("userId").references(() => users.id, { onDelete: "cascade" }),
1446
+ resumeUrl: text48("resumeUrl"),
1364
1447
  status: interviewApplicantStatusEnum("status").notNull().default("PENDING"),
1365
- referralCode: text46("referralCode"),
1366
- appliedSessionId: text46("appliedSessionId").references(
1448
+ referralCode: text48("referralCode"),
1449
+ appliedSessionId: text48("appliedSessionId").references(
1367
1450
  () => walkInInterviewCompanySlots.id,
1368
1451
  { onDelete: "cascade" }
1369
1452
  ),
1370
- appliedAt: timestamp48("appliedAt"),
1371
- createdAt: timestamp48("createdAt").notNull().defaultNow(),
1372
- updatedAt: timestamp48("updatedAt").notNull().defaultNow()
1453
+ appliedAt: timestamp50("appliedAt"),
1454
+ createdAt: timestamp50("createdAt").notNull().defaultNow(),
1455
+ updatedAt: timestamp50("updatedAt").notNull().defaultNow()
1373
1456
  },
1374
1457
  (table) => [
1375
- index35("walkInInterviewApplicants_userId_idx").on(table.userId),
1376
- uniqueIndex2("walkInInterviewApplicants_appliedSessionId_unique_idx").on(
1458
+ index37("walkInInterviewApplicants_userId_idx").on(table.userId),
1459
+ uniqueIndex3("walkInInterviewApplicants_appliedSessionId_unique_idx").on(
1377
1460
  table.appliedSessionId
1378
1461
  )
1379
1462
  ]
1380
1463
  );
1381
- var walkInInterviewApplicantsRelations = relations41(
1464
+ var walkInInterviewApplicantsRelations = relations43(
1382
1465
  walkInInterviewApplicants,
1383
1466
  ({ one }) => ({
1384
1467
  user: one(users, {
@@ -1393,178 +1476,181 @@ var walkInInterviewApplicantsRelations = relations41(
1393
1476
  );
1394
1477
 
1395
1478
  // cvclinic/cv-clinic-claim.schema.ts
1396
- import { pgTable as pgTable50, text as text48, timestamp as timestamp49 } from "drizzle-orm/pg-core";
1479
+ import { pgTable as pgTable52, text as text50, timestamp as timestamp51 } from "drizzle-orm/pg-core";
1397
1480
 
1398
1481
  // cvclinic/cv-clinic-vouchers.schema.ts
1399
- import { pgTable as pgTable49, text as text47 } from "drizzle-orm/pg-core";
1400
- var cvClinicVouchers = pgTable49("cv_clinic_vouchers", {
1401
- code: text47("code").primaryKey()
1482
+ import { pgTable as pgTable51, text as text49 } from "drizzle-orm/pg-core";
1483
+ var cvClinicVouchers = pgTable51("cv_clinic_vouchers", {
1484
+ code: text49("code").primaryKey()
1402
1485
  });
1403
1486
 
1404
1487
  // cvclinic/cv-clinic-claim.schema.ts
1405
- var cvClinicClaims = pgTable50("cv_clinic_claims", {
1406
- id: text48("id").primaryKey(),
1407
- userId: text48("user_id").notNull().references(() => users.id, { onDelete: "cascade" }),
1408
- usedVoucherCode: text48("used_voucher_code").references(() => cvClinicVouchers.code, {
1488
+ var cvClinicClaims = pgTable52("cv_clinic_claims", {
1489
+ id: text50("id").primaryKey(),
1490
+ userId: text50("user_id").notNull().references(() => users.id, { onDelete: "cascade" }),
1491
+ usedVoucherCode: text50("used_voucher_code").references(() => cvClinicVouchers.code, {
1409
1492
  onDelete: "set null"
1410
1493
  }),
1411
- createdAt: timestamp49("created_at").notNull().defaultNow(),
1412
- updatedAt: timestamp49("updated_at").notNull().defaultNow()
1494
+ cvFileUrl: text50("cv_file_url"),
1495
+ cvFileName: text50("cv_file_name"),
1496
+ note: text50("note"),
1497
+ createdAt: timestamp51("created_at").notNull().defaultNow(),
1498
+ updatedAt: timestamp51("updated_at").notNull().defaultNow()
1413
1499
  });
1414
1500
 
1415
1501
  // voting/competition-showcase.schema.ts
1416
- import { pgTable as pgTable51, text as text49, timestamp as timestamp50, uniqueIndex as uniqueIndex3 } from "drizzle-orm/pg-core";
1417
- var competitionShowcases = pgTable51(
1502
+ import { pgTable as pgTable53, text as text51, timestamp as timestamp52, uniqueIndex as uniqueIndex4 } from "drizzle-orm/pg-core";
1503
+ var competitionShowcases = pgTable53(
1418
1504
  "competition_showcases",
1419
1505
  {
1420
- id: text49("id").primaryKey(),
1421
- slug: text49("slug").unique(),
1422
- name: text49("name").notNull(),
1423
- createdAt: timestamp50("created_at").notNull().defaultNow(),
1424
- updatedAt: timestamp50("updated_at").notNull().defaultNow()
1506
+ id: text51("id").primaryKey(),
1507
+ slug: text51("slug").unique(),
1508
+ name: text51("name").notNull(),
1509
+ createdAt: timestamp52("created_at").notNull().defaultNow(),
1510
+ updatedAt: timestamp52("updated_at").notNull().defaultNow()
1425
1511
  },
1426
- (table) => [uniqueIndex3("competition_showcases_name_unique").on(table.name)]
1512
+ (table) => [uniqueIndex4("competition_showcases_name_unique").on(table.name)]
1427
1513
  );
1428
1514
 
1429
1515
  // voting/nominee.schema.ts
1430
- import { boolean as boolean15, integer as integer8, pgTable as pgTable52, text as text50, timestamp as timestamp51 } from "drizzle-orm/pg-core";
1431
- var nominees = pgTable52("nominees", {
1432
- id: text50("id").primaryKey(),
1516
+ import { boolean as boolean18, integer as integer9, pgTable as pgTable54, text as text52, timestamp as timestamp53 } from "drizzle-orm/pg-core";
1517
+ var nominees = pgTable54("nominees", {
1518
+ id: text52("id").primaryKey(),
1433
1519
  type: nomineeTypeEnum("type").notNull(),
1434
- name: text50("name").notNull(),
1435
- developer: text50("developer").notNull(),
1436
- description: text50("description"),
1437
- thumbnailUrl: text50("thumbnail_url"),
1438
- url: text50("url"),
1439
- isActive: boolean15("is_active").notNull().default(true),
1440
- point: integer8("point").notNull().default(0),
1441
- deletedAt: timestamp51("deleted_at"),
1442
- createdAt: timestamp51("created_at").notNull().defaultNow(),
1443
- updatedAt: timestamp51("updated_at").notNull().defaultNow()
1520
+ name: text52("name").notNull(),
1521
+ developer: text52("developer").notNull(),
1522
+ description: text52("description"),
1523
+ thumbnailUrl: text52("thumbnail_url"),
1524
+ url: text52("url"),
1525
+ isActive: boolean18("is_active").notNull().default(true),
1526
+ point: integer9("point").notNull().default(0),
1527
+ deletedAt: timestamp53("deleted_at"),
1528
+ createdAt: timestamp53("created_at").notNull().defaultNow(),
1529
+ updatedAt: timestamp53("updated_at").notNull().defaultNow()
1444
1530
  });
1445
1531
 
1446
1532
  // voting/nominee-vote.schema.ts
1447
- import { pgTable as pgTable53, text as text51, timestamp as timestamp52 } from "drizzle-orm/pg-core";
1448
- var nomineeVotes = pgTable53("nominee_votes", {
1449
- id: text51("id").primaryKey(),
1450
- userId: text51("user_id").notNull().references(() => users.id, { onDelete: "cascade" }),
1533
+ import { pgTable as pgTable55, text as text53, timestamp as timestamp54 } from "drizzle-orm/pg-core";
1534
+ var nomineeVotes = pgTable55("nominee_votes", {
1535
+ id: text53("id").primaryKey(),
1536
+ userId: text53("user_id").notNull().references(() => users.id, { onDelete: "cascade" }),
1451
1537
  type: nomineeTypeEnum("type").notNull(),
1452
- firstChoiceNomineeId: text51("first_choice_nominee_id").notNull().references(() => nominees.id, { onDelete: "cascade" }),
1453
- secondChoiceNomineeId: text51("second_choice_nominee_id").notNull().references(() => nominees.id, { onDelete: "cascade" }),
1454
- thirdChoiceNomineeId: text51("third_choice_nominee_id").notNull().references(() => nominees.id, { onDelete: "cascade" }),
1455
- createdAt: timestamp52("created_at").notNull().defaultNow(),
1456
- updatedAt: timestamp52("updated_at").notNull().defaultNow()
1538
+ firstChoiceNomineeId: text53("first_choice_nominee_id").notNull().references(() => nominees.id, { onDelete: "cascade" }),
1539
+ secondChoiceNomineeId: text53("second_choice_nominee_id").notNull().references(() => nominees.id, { onDelete: "cascade" }),
1540
+ thirdChoiceNomineeId: text53("third_choice_nominee_id").notNull().references(() => nominees.id, { onDelete: "cascade" }),
1541
+ createdAt: timestamp54("created_at").notNull().defaultNow(),
1542
+ updatedAt: timestamp54("updated_at").notNull().defaultNow()
1457
1543
  });
1458
1544
 
1459
1545
  // voting/project.schema.ts
1460
- import { integer as integer9, pgTable as pgTable54, text as text52, timestamp as timestamp53, uniqueIndex as uniqueIndex4 } from "drizzle-orm/pg-core";
1461
- var projects = pgTable54(
1546
+ import { integer as integer10, pgTable as pgTable56, text as text54, timestamp as timestamp55, uniqueIndex as uniqueIndex5 } from "drizzle-orm/pg-core";
1547
+ var projects = pgTable56(
1462
1548
  "projects",
1463
1549
  {
1464
- id: text52("id").primaryKey(),
1465
- slug: text52("slug").notNull().unique(),
1466
- name: text52("name").notNull(),
1550
+ id: text54("id").primaryKey(),
1551
+ slug: text54("slug").notNull().unique(),
1552
+ name: text54("name").notNull(),
1467
1553
  type: nomineeTypeEnum("type").notNull(),
1468
- imageUrl: text52("image_url"),
1469
- description: text52("description"),
1470
- youtubeUrl: text52("youtube_url"),
1471
- externalUrl: text52("external_url"),
1472
- teamName: text52("team_name").notNull(),
1473
- votes: integer9("votes").notNull().default(0),
1474
- deletedAt: timestamp53("deleted_at"),
1475
- createdAt: timestamp53("created_at").notNull().defaultNow(),
1476
- updatedAt: timestamp53("updated_at").notNull().defaultNow()
1554
+ imageUrl: text54("image_url"),
1555
+ description: text54("description"),
1556
+ youtubeUrl: text54("youtube_url"),
1557
+ externalUrl: text54("external_url"),
1558
+ teamName: text54("team_name").notNull(),
1559
+ votes: integer10("votes").notNull().default(0),
1560
+ deletedAt: timestamp55("deleted_at"),
1561
+ createdAt: timestamp55("created_at").notNull().defaultNow(),
1562
+ updatedAt: timestamp55("updated_at").notNull().defaultNow()
1477
1563
  },
1478
- (table) => [uniqueIndex4("projects_type_name_unique").on(table.type, table.name)]
1564
+ (table) => [uniqueIndex5("projects_type_name_unique").on(table.type, table.name)]
1479
1565
  );
1480
1566
 
1481
1567
  // voting/project-vote.schema.ts
1482
- import { index as index36, pgTable as pgTable55, text as text53, timestamp as timestamp54, uniqueIndex as uniqueIndex5 } from "drizzle-orm/pg-core";
1483
- var projectVotes = pgTable55(
1568
+ import { index as index38, pgTable as pgTable57, text as text55, timestamp as timestamp56, uniqueIndex as uniqueIndex6 } from "drizzle-orm/pg-core";
1569
+ var projectVotes = pgTable57(
1484
1570
  "project_votes",
1485
1571
  {
1486
- id: text53("id").primaryKey(),
1487
- userId: text53("user_id").notNull().references(() => users.id, { onDelete: "cascade" }),
1488
- projectId: text53("project_id").notNull().references(() => projects.id, { onDelete: "cascade" }),
1572
+ id: text55("id").primaryKey(),
1573
+ userId: text55("user_id").notNull().references(() => users.id, { onDelete: "cascade" }),
1574
+ projectId: text55("project_id").notNull().references(() => projects.id, { onDelete: "cascade" }),
1489
1575
  type: nomineeTypeEnum("type").notNull(),
1490
- createdAt: timestamp54("created_at").notNull().defaultNow()
1576
+ createdAt: timestamp56("created_at").notNull().defaultNow()
1491
1577
  },
1492
1578
  (table) => [
1493
- uniqueIndex5("project_votes_user_project_unique").on(table.userId, table.projectId),
1494
- index36("project_votes_user_type_idx").on(table.userId, table.type),
1495
- index36("project_votes_project_idx").on(table.projectId)
1579
+ uniqueIndex6("project_votes_user_project_unique").on(table.userId, table.projectId),
1580
+ index38("project_votes_user_type_idx").on(table.userId, table.type),
1581
+ index38("project_votes_project_idx").on(table.projectId)
1496
1582
  ]
1497
1583
  );
1498
1584
 
1499
1585
  // booth/exhibitor.schema.ts
1500
- import { index as index37, pgTable as pgTable56, text as text54, timestamp as timestamp55 } from "drizzle-orm/pg-core";
1501
- var exhibitors = pgTable56(
1586
+ import { index as index39, pgTable as pgTable58, text as text56, timestamp as timestamp57 } from "drizzle-orm/pg-core";
1587
+ var exhibitors = pgTable58(
1502
1588
  "exhibitors",
1503
1589
  {
1504
- id: text54("id").primaryKey(),
1505
- companyName: text54("company_name").notNull(),
1506
- name: text54("name").notNull(),
1507
- email: text54("email").notNull(),
1508
- phoneNumber: text54("phone_number").notNull(),
1509
- deletedAt: timestamp55("deleted_at"),
1510
- createdAt: timestamp55("created_at").notNull().defaultNow(),
1511
- updatedAt: timestamp55("updated_at").notNull().defaultNow()
1590
+ id: text56("id").primaryKey(),
1591
+ companyName: text56("company_name").notNull(),
1592
+ name: text56("name").notNull(),
1593
+ email: text56("email").notNull(),
1594
+ phoneNumber: text56("phone_number").notNull(),
1595
+ deletedAt: timestamp57("deleted_at"),
1596
+ createdAt: timestamp57("created_at").notNull().defaultNow(),
1597
+ updatedAt: timestamp57("updated_at").notNull().defaultNow()
1512
1598
  },
1513
1599
  (table) => [
1514
- index37("exhibitors_company_name_idx").on(table.companyName),
1515
- index37("exhibitors_email_idx").on(table.email)
1600
+ index39("exhibitors_company_name_idx").on(table.companyName),
1601
+ index39("exhibitors_email_idx").on(table.email)
1516
1602
  ]
1517
1603
  );
1518
1604
 
1519
1605
  // booth/main-event-booth-reward.schema.ts
1520
- import { index as index38, integer as integer10, pgTable as pgTable57, text as text55, timestamp as timestamp56 } from "drizzle-orm/pg-core";
1521
- var mainEventBoothRewards = pgTable57(
1606
+ import { index as index40, integer as integer11, pgTable as pgTable59, text as text57, timestamp as timestamp58 } from "drizzle-orm/pg-core";
1607
+ var mainEventBoothRewards = pgTable59(
1522
1608
  "main_event_booth_rewards",
1523
1609
  {
1524
- id: text55("id").primaryKey(),
1525
- companyName: text55("company_name").notNull(),
1526
- description: text55("description").notNull(),
1527
- points: integer10("points").notNull(),
1610
+ id: text57("id").primaryKey(),
1611
+ companyName: text57("company_name").notNull(),
1612
+ description: text57("description").notNull(),
1613
+ points: integer11("points").notNull(),
1528
1614
  type: boothRewardTypeEnum("type").notNull(),
1529
- createdAt: timestamp56("created_at").notNull().defaultNow(),
1530
- updatedAt: timestamp56("updated_at").notNull().defaultNow()
1615
+ createdAt: timestamp58("created_at").notNull().defaultNow(),
1616
+ updatedAt: timestamp58("updated_at").notNull().defaultNow()
1531
1617
  },
1532
1618
  (table) => [
1533
- index38("main_event_booth_rewards_company_name_idx").on(table.companyName),
1534
- index38("main_event_booth_rewards_type_idx").on(table.type)
1619
+ index40("main_event_booth_rewards_company_name_idx").on(table.companyName),
1620
+ index40("main_event_booth_rewards_type_idx").on(table.type)
1535
1621
  ]
1536
1622
  );
1537
1623
 
1538
1624
  // supermarket/supermarket-item.schema.ts
1539
- import { decimal, integer as integer11, pgTable as pgTable58, text as text56, timestamp as timestamp57 } from "drizzle-orm/pg-core";
1540
- var supermarketItems = pgTable58("supermarket_items", {
1541
- id: text56("id").primaryKey(),
1542
- name: text56("name").notNull(),
1543
- description: text56("description"),
1625
+ import { decimal, integer as integer12, pgTable as pgTable60, text as text58, timestamp as timestamp59 } from "drizzle-orm/pg-core";
1626
+ var supermarketItems = pgTable60("supermarket_items", {
1627
+ id: text58("id").primaryKey(),
1628
+ name: text58("name").notNull(),
1629
+ description: text58("description"),
1544
1630
  price: decimal("price", { precision: 10, scale: 2 }).notNull(),
1545
- stock: integer11("stock").notNull().default(0),
1546
- category: text56("category").notNull(),
1547
- imageUrl: text56("image_url"),
1548
- deletedAt: timestamp57("deleted_at"),
1631
+ stock: integer12("stock").notNull().default(0),
1632
+ category: text58("category").notNull(),
1633
+ imageUrl: text58("image_url"),
1634
+ deletedAt: timestamp59("deleted_at"),
1549
1635
  // Soft delete
1550
- createdAt: timestamp57("created_at").notNull().defaultNow(),
1551
- updatedAt: timestamp57("updated_at").notNull().defaultNow()
1636
+ createdAt: timestamp59("created_at").notNull().defaultNow(),
1637
+ updatedAt: timestamp59("updated_at").notNull().defaultNow()
1552
1638
  });
1553
1639
 
1554
1640
  // supermarket/supermarket-item-option.schema.ts
1555
- import { relations as relations42 } from "drizzle-orm";
1556
- import { pgTable as pgTable59, text as text57, timestamp as timestamp58 } from "drizzle-orm/pg-core";
1557
- var supermarketItemOptions = pgTable59("supermarket_item_options", {
1558
- id: text57("id").primaryKey(),
1559
- itemId: text57("item_id").notNull().references(() => supermarketItems.id, { onDelete: "cascade" }),
1560
- key: text57("key").notNull(),
1561
- value: text57("value").notNull(),
1562
- deletedAt: timestamp58("deleted_at"),
1641
+ import { relations as relations44 } from "drizzle-orm";
1642
+ import { pgTable as pgTable61, text as text59, timestamp as timestamp60 } from "drizzle-orm/pg-core";
1643
+ var supermarketItemOptions = pgTable61("supermarket_item_options", {
1644
+ id: text59("id").primaryKey(),
1645
+ itemId: text59("item_id").notNull().references(() => supermarketItems.id, { onDelete: "cascade" }),
1646
+ key: text59("key").notNull(),
1647
+ value: text59("value").notNull(),
1648
+ deletedAt: timestamp60("deleted_at"),
1563
1649
  // Soft delete
1564
- createdAt: timestamp58("created_at").notNull().defaultNow(),
1565
- updatedAt: timestamp58("updated_at").notNull().defaultNow()
1650
+ createdAt: timestamp60("created_at").notNull().defaultNow(),
1651
+ updatedAt: timestamp60("updated_at").notNull().defaultNow()
1566
1652
  });
1567
- var supermarketItemOptionsRelations = relations42(supermarketItemOptions, ({ one }) => ({
1653
+ var supermarketItemOptionsRelations = relations44(supermarketItemOptions, ({ one }) => ({
1568
1654
  item: one(supermarketItems, {
1569
1655
  fields: [supermarketItemOptions.itemId],
1570
1656
  references: [supermarketItems.id]
@@ -1572,25 +1658,25 @@ var supermarketItemOptionsRelations = relations42(supermarketItemOptions, ({ one
1572
1658
  }));
1573
1659
 
1574
1660
  // supermarket/supermarket-user-cart.schema.ts
1575
- import { relations as relations44 } from "drizzle-orm";
1576
- import { decimal as decimal2, pgTable as pgTable61, text as text59, timestamp as timestamp60 } from "drizzle-orm/pg-core";
1661
+ import { relations as relations46 } from "drizzle-orm";
1662
+ import { decimal as decimal2, pgTable as pgTable63, text as text61, timestamp as timestamp62 } from "drizzle-orm/pg-core";
1577
1663
 
1578
1664
  // supermarket/supermarket-user-cart-item.schema.ts
1579
- import { relations as relations43 } from "drizzle-orm";
1580
- import { integer as integer12, json as json3, pgTable as pgTable60, text as text58, timestamp as timestamp59 } from "drizzle-orm/pg-core";
1581
- var supermarketUserCartItems = pgTable60("supermarket_user_cart_items", {
1582
- id: text58("id").primaryKey(),
1583
- cartId: text58("cart_id").notNull().references(() => supermarketUserCarts.id, { onDelete: "cascade" }),
1584
- itemId: text58("item_id").notNull().references(() => supermarketItems.id, { onDelete: "cascade" }),
1585
- quantity: integer12("quantity").notNull().default(1),
1665
+ import { relations as relations45 } from "drizzle-orm";
1666
+ import { integer as integer13, json as json3, pgTable as pgTable62, text as text60, timestamp as timestamp61 } from "drizzle-orm/pg-core";
1667
+ var supermarketUserCartItems = pgTable62("supermarket_user_cart_items", {
1668
+ id: text60("id").primaryKey(),
1669
+ cartId: text60("cart_id").notNull().references(() => supermarketUserCarts.id, { onDelete: "cascade" }),
1670
+ itemId: text60("item_id").notNull().references(() => supermarketItems.id, { onDelete: "cascade" }),
1671
+ quantity: integer13("quantity").notNull().default(1),
1586
1672
  selectedOptions: json3("selected_options"),
1587
1673
  // JSON to store selected option key-value pairs
1588
- deletedAt: timestamp59("deleted_at"),
1674
+ deletedAt: timestamp61("deleted_at"),
1589
1675
  // Soft delete
1590
- createdAt: timestamp59("created_at").notNull().defaultNow(),
1591
- updatedAt: timestamp59("updated_at").notNull().defaultNow()
1676
+ createdAt: timestamp61("created_at").notNull().defaultNow(),
1677
+ updatedAt: timestamp61("updated_at").notNull().defaultNow()
1592
1678
  });
1593
- var supermarketUserCartItemsRelations = relations43(supermarketUserCartItems, ({ one }) => ({
1679
+ var supermarketUserCartItemsRelations = relations45(supermarketUserCartItems, ({ one }) => ({
1594
1680
  cart: one(supermarketUserCarts, {
1595
1681
  fields: [supermarketUserCartItems.cartId],
1596
1682
  references: [supermarketUserCarts.id]
@@ -1602,82 +1688,82 @@ var supermarketUserCartItemsRelations = relations43(supermarketUserCartItems, ({
1602
1688
  }));
1603
1689
 
1604
1690
  // supermarket/supermarket-user-cart.schema.ts
1605
- var supermarketUserCarts = pgTable61("supermarket_user_carts", {
1606
- id: text59("id").primaryKey(),
1607
- userId: text59("user_id").notNull().references(() => users.id, { onDelete: "cascade" }),
1691
+ var supermarketUserCarts = pgTable63("supermarket_user_carts", {
1692
+ id: text61("id").primaryKey(),
1693
+ userId: text61("user_id").notNull().references(() => users.id, { onDelete: "cascade" }),
1608
1694
  totalPrice: decimal2("total_price", { precision: 10, scale: 2 }).notNull(),
1609
1695
  status: cartStatusEnum("status").notNull().default("PENDING"),
1610
- deletedAt: timestamp60("deleted_at"),
1696
+ deletedAt: timestamp62("deleted_at"),
1611
1697
  // Soft delete
1612
- createdAt: timestamp60("created_at").notNull().defaultNow(),
1613
- updatedAt: timestamp60("updated_at").notNull().defaultNow()
1698
+ createdAt: timestamp62("created_at").notNull().defaultNow(),
1699
+ updatedAt: timestamp62("updated_at").notNull().defaultNow()
1614
1700
  });
1615
- var supermarketUserCartsRelations = relations44(supermarketUserCarts, ({ many }) => ({
1701
+ var supermarketUserCartsRelations = relations46(supermarketUserCarts, ({ many }) => ({
1616
1702
  cartItems: many(supermarketUserCartItems)
1617
1703
  }));
1618
1704
 
1619
1705
  // content/article.schema.ts
1620
- import { pgTable as pgTable62, text as text60, timestamp as timestamp61 } from "drizzle-orm/pg-core";
1621
- var articles = pgTable62("articles", {
1622
- id: text60("id").primaryKey(),
1623
- title: text60("title").notNull(),
1624
- description: text60("description"),
1625
- url: text60("url").notNull(),
1626
- imageUrl: text60("image_url"),
1627
- deletedAt: timestamp61("deleted_at"),
1628
- createdAt: timestamp61("created_at").notNull().defaultNow(),
1629
- updatedAt: timestamp61("updated_at").notNull().defaultNow()
1706
+ import { pgTable as pgTable64, text as text62, timestamp as timestamp63 } from "drizzle-orm/pg-core";
1707
+ var articles = pgTable64("articles", {
1708
+ id: text62("id").primaryKey(),
1709
+ title: text62("title").notNull(),
1710
+ description: text62("description"),
1711
+ url: text62("url").notNull(),
1712
+ imageUrl: text62("image_url"),
1713
+ deletedAt: timestamp63("deleted_at"),
1714
+ createdAt: timestamp63("created_at").notNull().defaultNow(),
1715
+ updatedAt: timestamp63("updated_at").notNull().defaultNow()
1630
1716
  });
1631
1717
 
1632
1718
  // content/explore-it-funfact.schema.ts
1633
- import { pgTable as pgTable63, text as text61, timestamp as timestamp62 } from "drizzle-orm/pg-core";
1634
- var exploreITFunfacts = pgTable63("explore_it_funfacts", {
1635
- id: text61("id").primaryKey(),
1636
- title: text61("title").notNull(),
1637
- content: text61("content").notNull(),
1638
- imageUrl: text61("image_url"),
1639
- deletedAt: timestamp62("deleted_at"),
1640
- createdAt: timestamp62("created_at").notNull().defaultNow(),
1641
- updatedAt: timestamp62("updated_at").notNull().defaultNow()
1719
+ import { pgTable as pgTable65, text as text63, timestamp as timestamp64 } from "drizzle-orm/pg-core";
1720
+ var exploreITFunfacts = pgTable65("explore_it_funfacts", {
1721
+ id: text63("id").primaryKey(),
1722
+ title: text63("title").notNull(),
1723
+ content: text63("content").notNull(),
1724
+ imageUrl: text63("image_url"),
1725
+ deletedAt: timestamp64("deleted_at"),
1726
+ createdAt: timestamp64("created_at").notNull().defaultNow(),
1727
+ updatedAt: timestamp64("updated_at").notNull().defaultNow()
1642
1728
  });
1643
1729
 
1644
1730
  // notifications/dashboard-notification.schema.ts
1645
- import { boolean as boolean16, index as index39, pgTable as pgTable64, text as text62, timestamp as timestamp63 } from "drizzle-orm/pg-core";
1646
- var dashboardNotifications = pgTable64(
1731
+ import { boolean as boolean19, index as index41, pgTable as pgTable66, text as text64, timestamp as timestamp65 } from "drizzle-orm/pg-core";
1732
+ var dashboardNotifications = pgTable66(
1647
1733
  "dashboard_notifications",
1648
1734
  {
1649
- id: text62("id").primaryKey(),
1650
- title: text62("title").notNull(),
1651
- content: text62("content").notNull(),
1652
- isPrivate: boolean16("is_private").notNull().default(false),
1653
- type: text62("type").notNull(),
1735
+ id: text64("id").primaryKey(),
1736
+ title: text64("title").notNull(),
1737
+ content: text64("content").notNull(),
1738
+ isPrivate: boolean19("is_private").notNull().default(false),
1739
+ type: text64("type").notNull(),
1654
1740
  programCode: programCodeEnum("program_code"),
1655
- deletedAt: timestamp63("deleted_at"),
1656
- createdAt: timestamp63("created_at").notNull().defaultNow(),
1657
- updatedAt: timestamp63("updated_at").notNull().defaultNow()
1741
+ deletedAt: timestamp65("deleted_at"),
1742
+ createdAt: timestamp65("created_at").notNull().defaultNow(),
1743
+ updatedAt: timestamp65("updated_at").notNull().defaultNow()
1658
1744
  },
1659
- (table) => [index39("dashboard_notifications_program_code_idx").on(table.programCode)]
1745
+ (table) => [index41("dashboard_notifications_program_code_idx").on(table.programCode)]
1660
1746
  );
1661
1747
 
1662
1748
  // notifications/dashboard-notification-user-read.schema.ts
1663
- import { relations as relations45 } from "drizzle-orm";
1664
- import { boolean as boolean17, index as index40, pgTable as pgTable65, text as text63, timestamp as timestamp64 } from "drizzle-orm/pg-core";
1665
- var dashboardNotificationUserReads = pgTable65(
1749
+ import { relations as relations47 } from "drizzle-orm";
1750
+ import { boolean as boolean20, index as index42, pgTable as pgTable67, text as text65, timestamp as timestamp66 } from "drizzle-orm/pg-core";
1751
+ var dashboardNotificationUserReads = pgTable67(
1666
1752
  "dashboard_notification_user_reads",
1667
1753
  {
1668
- id: text63("id").primaryKey(),
1669
- userId: text63("user_id").notNull().references(() => users.id, { onDelete: "cascade" }),
1670
- notificationId: text63("notification_id").notNull().references(() => dashboardNotifications.id, { onDelete: "cascade" }),
1671
- isOpened: boolean17("is_opened").notNull().default(false),
1672
- createdAt: timestamp64("created_at").notNull().defaultNow(),
1673
- updatedAt: timestamp64("updated_at").notNull().defaultNow()
1754
+ id: text65("id").primaryKey(),
1755
+ userId: text65("user_id").notNull().references(() => users.id, { onDelete: "cascade" }),
1756
+ notificationId: text65("notification_id").notNull().references(() => dashboardNotifications.id, { onDelete: "cascade" }),
1757
+ isOpened: boolean20("is_opened").notNull().default(false),
1758
+ createdAt: timestamp66("created_at").notNull().defaultNow(),
1759
+ updatedAt: timestamp66("updated_at").notNull().defaultNow()
1674
1760
  },
1675
1761
  (table) => [
1676
- index40("dashboard_notification_user_reads_user_id_idx").on(table.userId),
1677
- index40("dashboard_notification_user_reads_notification_id_idx").on(table.notificationId)
1762
+ index42("dashboard_notification_user_reads_user_id_idx").on(table.userId),
1763
+ index42("dashboard_notification_user_reads_notification_id_idx").on(table.notificationId)
1678
1764
  ]
1679
1765
  );
1680
- var dashboardNotificationUserReadsRelations = relations45(
1766
+ var dashboardNotificationUserReadsRelations = relations47(
1681
1767
  dashboardNotificationUserReads,
1682
1768
  ({ one }) => ({
1683
1769
  user: one(users, {
@@ -1692,32 +1778,32 @@ var dashboardNotificationUserReadsRelations = relations45(
1692
1778
  );
1693
1779
 
1694
1780
  // post-example/comment.schema.ts
1695
- import { pgTable as pgTable66, text as text64, uuid as uuid10 } from "drizzle-orm/pg-core";
1696
- var comments = pgTable66("comments", {
1781
+ import { pgTable as pgTable68, text as text66, uuid as uuid10 } from "drizzle-orm/pg-core";
1782
+ var comments = pgTable68("comments", {
1697
1783
  id: uuid10("id").primaryKey(),
1698
1784
  postId: uuid10("post_id").notNull(),
1699
- content: text64("content").notNull(),
1700
- author: text64("author").notNull()
1785
+ content: text66("content").notNull(),
1786
+ author: text66("author").notNull()
1701
1787
  });
1702
1788
 
1703
1789
  // post-example/like.schema.ts
1704
- import { pgTable as pgTable67, text as text65, uuid as uuid11 } from "drizzle-orm/pg-core";
1705
- var likes = pgTable67("likes", {
1790
+ import { pgTable as pgTable69, text as text67, uuid as uuid11 } from "drizzle-orm/pg-core";
1791
+ var likes = pgTable69("likes", {
1706
1792
  id: uuid11("id").primaryKey(),
1707
1793
  postId: uuid11("post_id").notNull(),
1708
- userName: text65("user_name").notNull()
1794
+ userName: text67("user_name").notNull()
1709
1795
  });
1710
1796
 
1711
1797
  // post-example/post.schema.ts
1712
- import { pgTable as pgTable68, text as text66, timestamp as timestamp65, uuid as uuid12 } from "drizzle-orm/pg-core";
1713
- var posts = pgTable68("posts", {
1798
+ import { pgTable as pgTable70, text as text68, timestamp as timestamp67, uuid as uuid12 } from "drizzle-orm/pg-core";
1799
+ var posts = pgTable70("posts", {
1714
1800
  id: uuid12("id").primaryKey(),
1715
1801
  // Primary Key UUID
1716
- title: text66("title").notNull(),
1717
- content: text66("content").notNull(),
1718
- author: text66("author").notNull(),
1719
- createdAt: timestamp65("created_at").defaultNow().notNull(),
1720
- updatedAt: timestamp65("updated_at").defaultNow().notNull()
1802
+ title: text68("title").notNull(),
1803
+ content: text68("content").notNull(),
1804
+ author: text68("author").notNull(),
1805
+ createdAt: timestamp67("created_at").defaultNow().notNull(),
1806
+ updatedAt: timestamp67("updated_at").defaultNow().notNull()
1721
1807
  });
1722
1808
  export {
1723
1809
  adWatchHistories,
@@ -1734,6 +1820,8 @@ export {
1734
1820
  companyExhibitionVacancies,
1735
1821
  companyExhibitionVacanciesRelations,
1736
1822
  companyExhibitions,
1823
+ competitionPaymentProofs,
1824
+ competitionPaymentProofsRelations,
1737
1825
  competitionShowcases,
1738
1826
  cvClinicClaims,
1739
1827
  cvClinicVouchers,
@@ -1769,6 +1857,7 @@ export {
1769
1857
  grandLaunchingRegistrations,
1770
1858
  grandLaunchingRegistrationsRelations,
1771
1859
  interviewApplicantStatusEnum,
1860
+ joinRequestStatusEnum,
1772
1861
  knowEventSourceEnum,
1773
1862
  leaderboardHistories,
1774
1863
  likes,
@@ -1830,6 +1919,8 @@ export {
1830
1919
  supermarketUserCartItemsRelations,
1831
1920
  supermarketUserCarts,
1832
1921
  supermarketUserCartsRelations,
1922
+ teamJoinRequests,
1923
+ teamJoinRequestsRelations,
1833
1924
  teamStatusEnum,
1834
1925
  teams,
1835
1926
  teamsRelations,