@compfest-18/oppenheimer-schema 0.0.6-staging.f62347d → 0.0.8

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