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