@compfest-18/oppenheimer-schema 0.0.5-develop.c0e6c23 → 0.0.6-develop.5850f63
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 +733 -40
- package/dist/index.mjs +646 -515
- 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,22 +813,35 @@ var xcelerateWorkshopTaskSubmissionsRelations = relations20(
|
|
|
740
813
|
);
|
|
741
814
|
|
|
742
815
|
// announcements/announcement.schema.ts
|
|
743
|
-
import { relations as
|
|
744
|
-
import { index 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
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
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()
|
|
755
837
|
},
|
|
756
|
-
(table) => [
|
|
838
|
+
(table) => [
|
|
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)
|
|
842
|
+
]
|
|
757
843
|
);
|
|
758
|
-
var announcementsRelations =
|
|
844
|
+
var announcementsRelations = relations23(announcements, ({ one }) => ({
|
|
759
845
|
program: one(programs, {
|
|
760
846
|
fields: [announcements.programId],
|
|
761
847
|
references: [programs.id]
|
|
@@ -763,69 +849,69 @@ var announcementsRelations = relations21(announcements, ({ one }) => ({
|
|
|
763
849
|
}));
|
|
764
850
|
|
|
765
851
|
// playground/leaderboard-history.schema.ts
|
|
766
|
-
import { pgTable as
|
|
852
|
+
import { pgTable as pgTable26, timestamp as timestamp26, uuid } from "drizzle-orm/pg-core";
|
|
767
853
|
import { jsonb as jsonb2 } from "drizzle-orm/pg-core";
|
|
768
|
-
var leaderboardHistories =
|
|
854
|
+
var leaderboardHistories = pgTable26("leaderboardHistories", {
|
|
769
855
|
id: uuid("id").primaryKey().defaultRandom(),
|
|
770
856
|
jsonData: jsonb2("json_data").notNull(),
|
|
771
|
-
createdAt:
|
|
772
|
-
updatedAt:
|
|
857
|
+
createdAt: timestamp26("created_at").notNull().defaultNow(),
|
|
858
|
+
updatedAt: timestamp26("updated_at").notNull().defaultNow()
|
|
773
859
|
});
|
|
774
860
|
|
|
775
861
|
// playground/user-playground.schema.ts
|
|
776
|
-
import { index as
|
|
777
|
-
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(
|
|
778
864
|
"userPlaygrounds",
|
|
779
865
|
{
|
|
780
866
|
id: uuid2("id").primaryKey().defaultRandom(),
|
|
781
|
-
userId:
|
|
782
|
-
username:
|
|
783
|
-
virtualPoint:
|
|
784
|
-
mainEventCurrency:
|
|
785
|
-
deletedAt:
|
|
786
|
-
createdAt:
|
|
787
|
-
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()
|
|
788
874
|
},
|
|
789
|
-
(table) => [
|
|
875
|
+
(table) => [index24("userPlaygrounds_userId_idx").on(table.userId)]
|
|
790
876
|
);
|
|
791
877
|
|
|
792
878
|
// playground/user-playground-detention.schema.ts
|
|
793
|
-
import { boolean as
|
|
794
|
-
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(
|
|
795
881
|
"userPlaygroundDetentions",
|
|
796
882
|
{
|
|
797
883
|
id: uuid3("id").primaryKey().defaultRandom(),
|
|
798
884
|
userPlaygroundId: uuid3("user_playground_id").notNull().unique().references(() => userPlaygrounds.id, { onDelete: "cascade" }),
|
|
799
|
-
description:
|
|
800
|
-
penaltyPoint:
|
|
885
|
+
description: text27("description").notNull(),
|
|
886
|
+
penaltyPoint: text27("penalty_point").notNull(),
|
|
801
887
|
state: detentionStateEnum("state").notNull(),
|
|
802
|
-
isRead:
|
|
803
|
-
deletedAt:
|
|
804
|
-
createdAt:
|
|
805
|
-
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()
|
|
806
892
|
},
|
|
807
|
-
(table) => [
|
|
893
|
+
(table) => [index25("userPlaygroundDetentions_userPlaygroundId_idx").on(table.userPlaygroundId)]
|
|
808
894
|
);
|
|
809
895
|
|
|
810
896
|
// games/game.schema.ts
|
|
811
|
-
import { relations as
|
|
812
|
-
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";
|
|
813
899
|
|
|
814
900
|
// games/game-developer.schema.ts
|
|
815
|
-
import { relations as
|
|
816
|
-
import { pgTable as
|
|
817
|
-
var gameDevelopers =
|
|
818
|
-
id:
|
|
819
|
-
gameId:
|
|
820
|
-
name:
|
|
821
|
-
description:
|
|
822
|
-
imageUrl:
|
|
823
|
-
instagramUrl:
|
|
824
|
-
linkedInUrl:
|
|
825
|
-
createdAt:
|
|
826
|
-
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()
|
|
827
913
|
});
|
|
828
|
-
var gameDevelopersRelations =
|
|
914
|
+
var gameDevelopersRelations = relations24(gameDevelopers, ({ one }) => ({
|
|
829
915
|
game: one(games, {
|
|
830
916
|
fields: [gameDevelopers.gameId],
|
|
831
917
|
references: [games.id]
|
|
@@ -833,17 +919,17 @@ var gameDevelopersRelations = relations22(gameDevelopers, ({ one }) => ({
|
|
|
833
919
|
}));
|
|
834
920
|
|
|
835
921
|
// games/game-rule.schema.ts
|
|
836
|
-
import { relations as
|
|
837
|
-
import { pgTable as
|
|
838
|
-
var gameRules =
|
|
839
|
-
id:
|
|
840
|
-
gameId:
|
|
841
|
-
title:
|
|
842
|
-
rule:
|
|
843
|
-
createdAt:
|
|
844
|
-
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()
|
|
845
931
|
});
|
|
846
|
-
var gameRulesRelations =
|
|
932
|
+
var gameRulesRelations = relations25(gameRules, ({ one }) => ({
|
|
847
933
|
game: one(games, {
|
|
848
934
|
fields: [gameRules.gameId],
|
|
849
935
|
references: [games.id]
|
|
@@ -851,24 +937,24 @@ var gameRulesRelations = relations23(gameRules, ({ one }) => ({
|
|
|
851
937
|
}));
|
|
852
938
|
|
|
853
939
|
// games/user-play-game-history.schema.ts
|
|
854
|
-
import { relations as
|
|
855
|
-
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";
|
|
856
942
|
|
|
857
943
|
// tokens/playground-token.schema.ts
|
|
858
|
-
import { relations as
|
|
859
|
-
import { boolean as
|
|
860
|
-
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", {
|
|
861
947
|
id: uuid4("id").primaryKey().defaultRandom(),
|
|
862
948
|
userPlaygroundId: uuid4("userPlaygroundId").references(() => userPlaygrounds.id, { onDelete: "cascade" }).notNull(),
|
|
863
949
|
code: varchar("code", { length: 6 }).notNull().unique(),
|
|
864
950
|
tokenType: tokenTypeEnum("tokenType").notNull(),
|
|
865
|
-
isUsed:
|
|
866
|
-
usedAt:
|
|
867
|
-
deletedAt:
|
|
868
|
-
createdAt:
|
|
869
|
-
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()
|
|
870
956
|
});
|
|
871
|
-
var playgroundTokensRelations =
|
|
957
|
+
var playgroundTokensRelations = relations26(playgroundTokens, ({ one }) => ({
|
|
872
958
|
userPlayground: one(userPlaygrounds, {
|
|
873
959
|
fields: [playgroundTokens.userPlaygroundId],
|
|
874
960
|
references: [userPlaygrounds.id]
|
|
@@ -876,19 +962,19 @@ var playgroundTokensRelations = relations24(playgroundTokens, ({ one }) => ({
|
|
|
876
962
|
}));
|
|
877
963
|
|
|
878
964
|
// games/user-play-game-history.schema.ts
|
|
879
|
-
var userPlayGameHistories =
|
|
880
|
-
id:
|
|
965
|
+
var userPlayGameHistories = pgTable32("userPlayGameHistories", {
|
|
966
|
+
id: text30("id").primaryKey(),
|
|
881
967
|
userPlaygroundId: uuid5("userPlaygroundId").references(() => userPlaygrounds.id, { onDelete: "cascade" }).notNull(),
|
|
882
|
-
gameId:
|
|
968
|
+
gameId: text30("gameId").references(() => games.id, { onDelete: "cascade" }).notNull(),
|
|
883
969
|
tokenUsedId: uuid5("tokenUsedId").references(() => playgroundTokens.id, {
|
|
884
970
|
onDelete: "set null"
|
|
885
971
|
}),
|
|
886
|
-
isFinished:
|
|
887
|
-
finishedAt:
|
|
888
|
-
createdAt:
|
|
889
|
-
updatedAt:
|
|
972
|
+
isFinished: boolean9("isFinished").notNull().default(false),
|
|
973
|
+
finishedAt: timestamp32("finishedAt"),
|
|
974
|
+
createdAt: timestamp32("createdAt").notNull().defaultNow(),
|
|
975
|
+
updatedAt: timestamp32("updatedAt").notNull().defaultNow()
|
|
890
976
|
});
|
|
891
|
-
var userPlayGameHistoriesRelations =
|
|
977
|
+
var userPlayGameHistoriesRelations = relations27(userPlayGameHistories, ({ one }) => ({
|
|
892
978
|
userPlayground: one(userPlaygrounds, {
|
|
893
979
|
fields: [userPlayGameHistories.userPlaygroundId],
|
|
894
980
|
references: [userPlaygrounds.id]
|
|
@@ -904,44 +990,44 @@ var userPlayGameHistoriesRelations = relations25(userPlayGameHistories, ({ one }
|
|
|
904
990
|
}));
|
|
905
991
|
|
|
906
992
|
// games/game.schema.ts
|
|
907
|
-
var games =
|
|
908
|
-
id:
|
|
909
|
-
name:
|
|
910
|
-
arcadeCode:
|
|
911
|
-
arcadeUrl:
|
|
912
|
-
description:
|
|
913
|
-
rules:
|
|
914
|
-
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),
|
|
915
1001
|
orientation: gameOrientationEnum("orientation").notNull().default("VERTICAL"),
|
|
916
|
-
createdAt:
|
|
917
|
-
updatedAt:
|
|
1002
|
+
createdAt: timestamp33("createdAt").notNull().defaultNow(),
|
|
1003
|
+
updatedAt: timestamp33("updatedAt").notNull().defaultNow()
|
|
918
1004
|
});
|
|
919
|
-
var gamesRelations =
|
|
1005
|
+
var gamesRelations = relations28(games, ({ many }) => ({
|
|
920
1006
|
gameRules: many(gameRules),
|
|
921
1007
|
gameDevelopers: many(gameDevelopers),
|
|
922
1008
|
userPlayGameHistories: many(userPlayGameHistories)
|
|
923
1009
|
}));
|
|
924
1010
|
|
|
925
1011
|
// tokens/playground-expense-history.schema.ts
|
|
926
|
-
import { relations as
|
|
927
|
-
import { index as
|
|
928
|
-
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(
|
|
929
1015
|
"playgroundExpenseHistories",
|
|
930
1016
|
{
|
|
931
|
-
id:
|
|
1017
|
+
id: text32("id").primaryKey(),
|
|
932
1018
|
userPlaygroundId: uuid6("userPlaygroundId").references(() => userPlaygrounds.id, {
|
|
933
1019
|
onDelete: "cascade"
|
|
934
1020
|
}),
|
|
935
|
-
description:
|
|
1021
|
+
description: text32("description"),
|
|
936
1022
|
amount: integer3("amount").notNull(),
|
|
937
|
-
createdAt:
|
|
938
|
-
updatedAt:
|
|
1023
|
+
createdAt: timestamp34("createdAt").notNull().defaultNow(),
|
|
1024
|
+
updatedAt: timestamp34("updatedAt").notNull().defaultNow()
|
|
939
1025
|
},
|
|
940
1026
|
(table) => [
|
|
941
|
-
|
|
1027
|
+
index26("playgroundExpenseHistories_userPlaygroundId_idx").on(table.userPlaygroundId)
|
|
942
1028
|
]
|
|
943
1029
|
);
|
|
944
|
-
var playgroundExpenseHistoriesRelations =
|
|
1030
|
+
var playgroundExpenseHistoriesRelations = relations29(
|
|
945
1031
|
playgroundExpenseHistories,
|
|
946
1032
|
({ one }) => ({
|
|
947
1033
|
userPlayground: one(userPlaygrounds, {
|
|
@@ -952,24 +1038,24 @@ var playgroundExpenseHistoriesRelations = relations27(
|
|
|
952
1038
|
);
|
|
953
1039
|
|
|
954
1040
|
// tokens/playground-reward-history.schema.ts
|
|
955
|
-
import { relations as
|
|
956
|
-
import { index as
|
|
957
|
-
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(
|
|
958
1044
|
"playgroundRewardHistories",
|
|
959
1045
|
{
|
|
960
|
-
id:
|
|
1046
|
+
id: text33("id").primaryKey(),
|
|
961
1047
|
userPlaygroundId: uuid7("userPlaygroundId").references(() => userPlaygrounds.id, {
|
|
962
1048
|
onDelete: "cascade"
|
|
963
1049
|
}),
|
|
964
|
-
description:
|
|
1050
|
+
description: text33("description"),
|
|
965
1051
|
rewardType: rewardTypeEnum("rewardType").notNull(),
|
|
966
1052
|
amount: integer4("amount").notNull(),
|
|
967
|
-
createdAt:
|
|
968
|
-
updatedAt:
|
|
1053
|
+
createdAt: timestamp35("createdAt").notNull().defaultNow(),
|
|
1054
|
+
updatedAt: timestamp35("updatedAt").notNull().defaultNow()
|
|
969
1055
|
},
|
|
970
|
-
(table) => [
|
|
1056
|
+
(table) => [index27("playgroundRewardHistories_userPlaygroundId_idx").on(table.userPlaygroundId)]
|
|
971
1057
|
);
|
|
972
|
-
var playgroundRewardHistoriesRelations =
|
|
1058
|
+
var playgroundRewardHistoriesRelations = relations30(
|
|
973
1059
|
playgroundRewardHistories,
|
|
974
1060
|
({ one }) => ({
|
|
975
1061
|
userPlayground: one(userPlaygrounds, {
|
|
@@ -980,33 +1066,33 @@ var playgroundRewardHistoriesRelations = relations28(
|
|
|
980
1066
|
);
|
|
981
1067
|
|
|
982
1068
|
// ads/ad-watch-history.schema.ts
|
|
983
|
-
import { relations as
|
|
984
|
-
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";
|
|
985
1071
|
|
|
986
1072
|
// ads/advertisement.schema.ts
|
|
987
|
-
import { boolean as
|
|
988
|
-
var advertisements =
|
|
989
|
-
id:
|
|
990
|
-
contentUrl:
|
|
991
|
-
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),
|
|
992
1078
|
contentLength: integer5("contentLength"),
|
|
993
|
-
createdAt:
|
|
994
|
-
updatedAt:
|
|
1079
|
+
createdAt: timestamp36("createdAt").notNull().defaultNow(),
|
|
1080
|
+
updatedAt: timestamp36("updatedAt").notNull().defaultNow()
|
|
995
1081
|
});
|
|
996
1082
|
|
|
997
1083
|
// ads/ad-watch-history.schema.ts
|
|
998
|
-
var adWatchHistories =
|
|
999
|
-
id:
|
|
1084
|
+
var adWatchHistories = pgTable37("adWatchHistories", {
|
|
1085
|
+
id: text35("id").primaryKey(),
|
|
1000
1086
|
userPlaygroundId: uuid8("userPlaygroundId").references(() => userPlaygrounds.id, {
|
|
1001
1087
|
onDelete: "cascade"
|
|
1002
1088
|
}),
|
|
1003
|
-
adId:
|
|
1004
|
-
referer:
|
|
1005
|
-
watchedAt:
|
|
1006
|
-
createdAt:
|
|
1007
|
-
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()
|
|
1008
1094
|
});
|
|
1009
|
-
var adWatchHistoriesRelations =
|
|
1095
|
+
var adWatchHistoriesRelations = relations31(adWatchHistories, ({ one }) => ({
|
|
1010
1096
|
userPlayground: one(userPlaygrounds, {
|
|
1011
1097
|
fields: [adWatchHistories.userPlaygroundId],
|
|
1012
1098
|
references: [userPlaygrounds.id]
|
|
@@ -1018,22 +1104,22 @@ var adWatchHistoriesRelations = relations29(adWatchHistories, ({ one }) => ({
|
|
|
1018
1104
|
}));
|
|
1019
1105
|
|
|
1020
1106
|
// ads/ad-watch-session.schema.ts
|
|
1021
|
-
import { relations as
|
|
1022
|
-
import { integer as integer6, pgTable as
|
|
1023
|
-
var adWatchSessions =
|
|
1024
|
-
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(),
|
|
1025
1111
|
userPlaygroundId: uuid9("userPlaygroundId").references(() => userPlaygrounds.id, {
|
|
1026
1112
|
onDelete: "cascade"
|
|
1027
1113
|
}),
|
|
1028
|
-
adId:
|
|
1114
|
+
adId: text36("adId").references(() => advertisements.id, { onDelete: "cascade" }),
|
|
1029
1115
|
adLength: integer6("adLength"),
|
|
1030
1116
|
startTimeUnix: integer6("startTimeUnix").notNull(),
|
|
1031
1117
|
lockUntil: integer6("lockUntil"),
|
|
1032
|
-
finishedAt:
|
|
1033
|
-
createdAt:
|
|
1034
|
-
updatedAt:
|
|
1118
|
+
finishedAt: timestamp38("finishedAt"),
|
|
1119
|
+
createdAt: timestamp38("createdAt").notNull().defaultNow(),
|
|
1120
|
+
updatedAt: timestamp38("updatedAt").notNull().defaultNow()
|
|
1035
1121
|
});
|
|
1036
|
-
var adWatchSessionsRelations =
|
|
1122
|
+
var adWatchSessionsRelations = relations32(adWatchSessions, ({ one }) => ({
|
|
1037
1123
|
userPlayground: one(userPlaygrounds, {
|
|
1038
1124
|
fields: [adWatchSessions.userPlaygroundId],
|
|
1039
1125
|
references: [userPlaygrounds.id]
|
|
@@ -1045,29 +1131,29 @@ var adWatchSessionsRelations = relations30(adWatchSessions, ({ one }) => ({
|
|
|
1045
1131
|
}));
|
|
1046
1132
|
|
|
1047
1133
|
// quiz/main-event-mini-quiz.schema.ts
|
|
1048
|
-
import { relations as
|
|
1049
|
-
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";
|
|
1050
1136
|
|
|
1051
1137
|
// quiz/main-event-mini-quiz-attempt.schema.ts
|
|
1052
|
-
import { relations as
|
|
1053
|
-
import { index as
|
|
1054
|
-
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(
|
|
1055
1141
|
"mainEventMiniQuizAttempts",
|
|
1056
1142
|
{
|
|
1057
|
-
id:
|
|
1058
|
-
quizId:
|
|
1059
|
-
userId:
|
|
1143
|
+
id: text37("id").primaryKey(),
|
|
1144
|
+
quizId: text37("quizId").references(() => mainEventMiniQuizzes.id, { onDelete: "cascade" }),
|
|
1145
|
+
userId: text37("userId").references(() => users.id, { onDelete: "cascade" }),
|
|
1060
1146
|
answerJson: json("answerJson"),
|
|
1061
|
-
attemptedAt:
|
|
1062
|
-
createdAt:
|
|
1063
|
-
updatedAt:
|
|
1147
|
+
attemptedAt: timestamp39("attemptedAt"),
|
|
1148
|
+
createdAt: timestamp39("createdAt").notNull().defaultNow(),
|
|
1149
|
+
updatedAt: timestamp39("updatedAt").notNull().defaultNow()
|
|
1064
1150
|
},
|
|
1065
1151
|
(table) => [
|
|
1066
|
-
|
|
1067
|
-
|
|
1152
|
+
index28("mainEventMiniQuizAttempts_quizId_idx").on(table.quizId),
|
|
1153
|
+
index28("mainEventMiniQuizAttempts_userId_idx").on(table.userId)
|
|
1068
1154
|
]
|
|
1069
1155
|
);
|
|
1070
|
-
var mainEventMiniQuizAttemptsRelations =
|
|
1156
|
+
var mainEventMiniQuizAttemptsRelations = relations33(
|
|
1071
1157
|
mainEventMiniQuizAttempts,
|
|
1072
1158
|
({ one }) => ({
|
|
1073
1159
|
quiz: one(mainEventMiniQuizzes, {
|
|
@@ -1082,27 +1168,27 @@ var mainEventMiniQuizAttemptsRelations = relations31(
|
|
|
1082
1168
|
);
|
|
1083
1169
|
|
|
1084
1170
|
// quiz/main-event-mini-quiz-question.schema.ts
|
|
1085
|
-
import { relations as
|
|
1086
|
-
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";
|
|
1087
1173
|
|
|
1088
1174
|
// quiz/main-event-mini-quiz-question-option.schema.ts
|
|
1089
|
-
import { relations as
|
|
1090
|
-
import { boolean as
|
|
1091
|
-
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(
|
|
1092
1178
|
"mainEventMiniQuizQuestionOptions",
|
|
1093
1179
|
{
|
|
1094
|
-
id:
|
|
1095
|
-
questionId:
|
|
1180
|
+
id: text38("id").primaryKey(),
|
|
1181
|
+
questionId: text38("questionId").references(() => mainEventMiniQuizQuestions.id, {
|
|
1096
1182
|
onDelete: "cascade"
|
|
1097
1183
|
}),
|
|
1098
|
-
option:
|
|
1099
|
-
isAnswer:
|
|
1100
|
-
createdAt:
|
|
1101
|
-
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()
|
|
1102
1188
|
},
|
|
1103
|
-
(table) => [
|
|
1189
|
+
(table) => [index29("mainEventMiniQuizQuestionOptions_questionId_idx").on(table.questionId)]
|
|
1104
1190
|
);
|
|
1105
|
-
var mainEventMiniQuizQuestionOptionsRelations =
|
|
1191
|
+
var mainEventMiniQuizQuestionOptionsRelations = relations34(
|
|
1106
1192
|
mainEventMiniQuizQuestionOptions,
|
|
1107
1193
|
({ one }) => ({
|
|
1108
1194
|
question: one(mainEventMiniQuizQuestions, {
|
|
@@ -1113,18 +1199,18 @@ var mainEventMiniQuizQuestionOptionsRelations = relations32(
|
|
|
1113
1199
|
);
|
|
1114
1200
|
|
|
1115
1201
|
// quiz/main-event-mini-quiz-question.schema.ts
|
|
1116
|
-
var mainEventMiniQuizQuestions =
|
|
1202
|
+
var mainEventMiniQuizQuestions = pgTable41(
|
|
1117
1203
|
"mainEventMiniQuizQuestions",
|
|
1118
1204
|
{
|
|
1119
|
-
id:
|
|
1120
|
-
quizId:
|
|
1121
|
-
question:
|
|
1122
|
-
createdAt:
|
|
1123
|
-
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()
|
|
1124
1210
|
},
|
|
1125
|
-
(table) => [
|
|
1211
|
+
(table) => [index30("mainEventMiniQuizQuestions_quizId_idx").on(table.quizId)]
|
|
1126
1212
|
);
|
|
1127
|
-
var mainEventMiniQuizQuestionsRelations =
|
|
1213
|
+
var mainEventMiniQuizQuestionsRelations = relations35(
|
|
1128
1214
|
mainEventMiniQuizQuestions,
|
|
1129
1215
|
({ one, many }) => ({
|
|
1130
1216
|
quiz: one(mainEventMiniQuizzes, {
|
|
@@ -1136,45 +1222,45 @@ var mainEventMiniQuizQuestionsRelations = relations33(
|
|
|
1136
1222
|
);
|
|
1137
1223
|
|
|
1138
1224
|
// quiz/main-event-mini-quiz.schema.ts
|
|
1139
|
-
var mainEventMiniQuizzes =
|
|
1225
|
+
var mainEventMiniQuizzes = pgTable42(
|
|
1140
1226
|
"mainEventMiniQuizzes",
|
|
1141
1227
|
{
|
|
1142
|
-
id:
|
|
1143
|
-
quizName:
|
|
1144
|
-
createdAt:
|
|
1145
|
-
updatedAt:
|
|
1228
|
+
id: text40("id").primaryKey(),
|
|
1229
|
+
quizName: text40("quizName").notNull(),
|
|
1230
|
+
createdAt: timestamp42("createdAt").notNull().defaultNow(),
|
|
1231
|
+
updatedAt: timestamp42("updatedAt").notNull().defaultNow()
|
|
1146
1232
|
},
|
|
1147
|
-
(table) => [
|
|
1233
|
+
(table) => [index31("mainEventMiniQuizzes_quizName_idx").on(table.quizName)]
|
|
1148
1234
|
);
|
|
1149
|
-
var mainEventMiniQuizzesRelations =
|
|
1235
|
+
var mainEventMiniQuizzesRelations = relations36(mainEventMiniQuizzes, ({ many }) => ({
|
|
1150
1236
|
questions: many(mainEventMiniQuizQuestions),
|
|
1151
1237
|
attempts: many(mainEventMiniQuizAttempts)
|
|
1152
1238
|
}));
|
|
1153
1239
|
|
|
1154
1240
|
// quiz/mini-quiz.schema.ts
|
|
1155
|
-
import { relations as
|
|
1156
|
-
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";
|
|
1157
1243
|
|
|
1158
1244
|
// quiz/mini-quiz-attempt.schema.ts
|
|
1159
|
-
import { relations as
|
|
1160
|
-
import { index as
|
|
1161
|
-
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(
|
|
1162
1248
|
"miniQuizAttempts",
|
|
1163
1249
|
{
|
|
1164
|
-
id:
|
|
1165
|
-
quizId:
|
|
1166
|
-
userId:
|
|
1250
|
+
id: text41("id").primaryKey(),
|
|
1251
|
+
quizId: text41("quizId").references(() => miniQuizzes.id, { onDelete: "cascade" }),
|
|
1252
|
+
userId: text41("userId").references(() => users.id, { onDelete: "cascade" }),
|
|
1167
1253
|
answerJson: json2("answerJson"),
|
|
1168
|
-
attemptedAt:
|
|
1169
|
-
createdAt:
|
|
1170
|
-
updatedAt:
|
|
1254
|
+
attemptedAt: timestamp43("attemptedAt"),
|
|
1255
|
+
createdAt: timestamp43("createdAt").notNull().defaultNow(),
|
|
1256
|
+
updatedAt: timestamp43("updatedAt").notNull().defaultNow()
|
|
1171
1257
|
},
|
|
1172
1258
|
(table) => [
|
|
1173
|
-
|
|
1174
|
-
|
|
1259
|
+
index32("miniQuizAttempts_quizId_idx").on(table.quizId),
|
|
1260
|
+
index32("miniQuizAttempts_userId_idx").on(table.userId)
|
|
1175
1261
|
]
|
|
1176
1262
|
);
|
|
1177
|
-
var miniQuizAttemptsRelations =
|
|
1263
|
+
var miniQuizAttemptsRelations = relations37(miniQuizAttempts, ({ one }) => ({
|
|
1178
1264
|
quiz: one(miniQuizzes, {
|
|
1179
1265
|
fields: [miniQuizAttempts.quizId],
|
|
1180
1266
|
references: [miniQuizzes.id]
|
|
@@ -1186,21 +1272,21 @@ var miniQuizAttemptsRelations = relations35(miniQuizAttempts, ({ one }) => ({
|
|
|
1186
1272
|
}));
|
|
1187
1273
|
|
|
1188
1274
|
// quiz/mini-quiz-question.schema.ts
|
|
1189
|
-
import { relations as
|
|
1190
|
-
import { boolean as
|
|
1191
|
-
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(
|
|
1192
1278
|
"miniQuizQuestions",
|
|
1193
1279
|
{
|
|
1194
|
-
id:
|
|
1195
|
-
quizId:
|
|
1196
|
-
question:
|
|
1197
|
-
isTrue:
|
|
1198
|
-
createdAt:
|
|
1199
|
-
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()
|
|
1200
1286
|
},
|
|
1201
|
-
(table) => [
|
|
1287
|
+
(table) => [index33("miniQuizQuestions_quizId_idx").on(table.quizId)]
|
|
1202
1288
|
);
|
|
1203
|
-
var miniQuizQuestionsRelations =
|
|
1289
|
+
var miniQuizQuestionsRelations = relations38(miniQuizQuestions, ({ one }) => ({
|
|
1204
1290
|
quiz: one(miniQuizzes, {
|
|
1205
1291
|
fields: [miniQuizQuestions.quizId],
|
|
1206
1292
|
references: [miniQuizzes.id]
|
|
@@ -1208,69 +1294,69 @@ var miniQuizQuestionsRelations = relations36(miniQuizQuestions, ({ one }) => ({
|
|
|
1208
1294
|
}));
|
|
1209
1295
|
|
|
1210
1296
|
// quiz/mini-quiz.schema.ts
|
|
1211
|
-
var miniQuizzes =
|
|
1297
|
+
var miniQuizzes = pgTable45(
|
|
1212
1298
|
"miniQuizzes",
|
|
1213
1299
|
{
|
|
1214
|
-
id:
|
|
1215
|
-
quizName:
|
|
1216
|
-
createdAt:
|
|
1217
|
-
updatedAt:
|
|
1300
|
+
id: text43("id").primaryKey(),
|
|
1301
|
+
quizName: text43("quizName").notNull(),
|
|
1302
|
+
createdAt: timestamp45("createdAt").notNull().defaultNow(),
|
|
1303
|
+
updatedAt: timestamp45("updatedAt").notNull().defaultNow()
|
|
1218
1304
|
},
|
|
1219
|
-
(table) => [
|
|
1305
|
+
(table) => [index34("miniQuizzes_quizName_idx").on(table.quizName)]
|
|
1220
1306
|
);
|
|
1221
|
-
var miniQuizzesRelations =
|
|
1307
|
+
var miniQuizzesRelations = relations39(miniQuizzes, ({ many }) => ({
|
|
1222
1308
|
questions: many(miniQuizQuestions),
|
|
1223
1309
|
attempts: many(miniQuizAttempts)
|
|
1224
1310
|
}));
|
|
1225
1311
|
|
|
1226
1312
|
// exhibition/company-exhibition.schema.ts
|
|
1227
|
-
import { pgTable as
|
|
1228
|
-
var companyExhibitions =
|
|
1229
|
-
id:
|
|
1230
|
-
name:
|
|
1231
|
-
location:
|
|
1232
|
-
iconUrl:
|
|
1233
|
-
description:
|
|
1234
|
-
tags:
|
|
1235
|
-
benefits:
|
|
1236
|
-
vision:
|
|
1237
|
-
mission:
|
|
1238
|
-
documentationLinks:
|
|
1239
|
-
websiteLink:
|
|
1240
|
-
createdAt:
|
|
1241
|
-
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()
|
|
1242
1328
|
});
|
|
1243
1329
|
|
|
1244
1330
|
// exhibition/company-exhibition-vacancies.schema.ts
|
|
1245
|
-
import { relations as
|
|
1246
|
-
import { boolean as
|
|
1247
|
-
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(
|
|
1248
1334
|
"companyExhibitionVacancies",
|
|
1249
1335
|
{
|
|
1250
|
-
id:
|
|
1251
|
-
companyExhibitionId:
|
|
1336
|
+
id: text45("id").primaryKey(),
|
|
1337
|
+
companyExhibitionId: text45("companyExhibitionId").references(() => companyExhibitions.id, {
|
|
1252
1338
|
onDelete: "cascade"
|
|
1253
1339
|
}),
|
|
1254
|
-
position:
|
|
1255
|
-
tags:
|
|
1256
|
-
description:
|
|
1257
|
-
benefits:
|
|
1340
|
+
position: text45("position").notNull(),
|
|
1341
|
+
tags: text45("tags"),
|
|
1342
|
+
description: text45("description"),
|
|
1343
|
+
benefits: text45("benefits"),
|
|
1258
1344
|
jobType: vacancyJobTypeEnum("jobType"),
|
|
1259
|
-
salary:
|
|
1260
|
-
deadline:
|
|
1261
|
-
responsibilities:
|
|
1262
|
-
requirements:
|
|
1263
|
-
vacancyUrl:
|
|
1264
|
-
isOpen:
|
|
1265
|
-
createdAt:
|
|
1266
|
-
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()
|
|
1267
1353
|
},
|
|
1268
1354
|
(table) => [
|
|
1269
|
-
|
|
1270
|
-
|
|
1355
|
+
index35("companyExhibitionVacancies_companyExhibitionId_idx").on(table.companyExhibitionId),
|
|
1356
|
+
index35("companyExhibitionVacancies_isOpen_idx").on(table.isOpen)
|
|
1271
1357
|
]
|
|
1272
1358
|
);
|
|
1273
|
-
var companyExhibitionVacanciesRelations =
|
|
1359
|
+
var companyExhibitionVacanciesRelations = relations40(
|
|
1274
1360
|
companyExhibitionVacancies,
|
|
1275
1361
|
({ one }) => ({
|
|
1276
1362
|
companyExhibition: one(companyExhibitions, {
|
|
@@ -1281,33 +1367,33 @@ var companyExhibitionVacanciesRelations = relations38(
|
|
|
1281
1367
|
);
|
|
1282
1368
|
|
|
1283
1369
|
// jobfair/walk-in-interview-applicant.schema.ts
|
|
1284
|
-
import { relations as
|
|
1285
|
-
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";
|
|
1286
1372
|
|
|
1287
1373
|
// jobfair/walk-in-interview-company-slot.schema.ts
|
|
1288
|
-
import { relations as
|
|
1289
|
-
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";
|
|
1290
1376
|
|
|
1291
1377
|
// jobfair/walk-in-interview-company.schema.ts
|
|
1292
|
-
import { relations as
|
|
1293
|
-
import { integer as integer7, pgTable as
|
|
1294
|
-
var walkInInterviewCompanies =
|
|
1295
|
-
id:
|
|
1296
|
-
name:
|
|
1297
|
-
description:
|
|
1298
|
-
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"),
|
|
1299
1385
|
slots: integer7("slots"),
|
|
1300
|
-
session:
|
|
1301
|
-
roles:
|
|
1302
|
-
tags:
|
|
1303
|
-
benefits:
|
|
1304
|
-
criteria:
|
|
1386
|
+
session: text46("session"),
|
|
1387
|
+
roles: text46("roles"),
|
|
1388
|
+
tags: text46("tags"),
|
|
1389
|
+
benefits: text46("benefits"),
|
|
1390
|
+
criteria: text46("criteria"),
|
|
1305
1391
|
currentApplicants: integer7("currentApplicants"),
|
|
1306
|
-
boothLocation:
|
|
1307
|
-
createdAt:
|
|
1308
|
-
updatedAt:
|
|
1392
|
+
boothLocation: text46("boothLocation"),
|
|
1393
|
+
createdAt: timestamp48("createdAt").notNull().defaultNow(),
|
|
1394
|
+
updatedAt: timestamp48("updatedAt").notNull().defaultNow()
|
|
1309
1395
|
});
|
|
1310
|
-
var walkInInterviewCompaniesRelations =
|
|
1396
|
+
var walkInInterviewCompaniesRelations = relations41(
|
|
1311
1397
|
walkInInterviewCompanies,
|
|
1312
1398
|
({ many }) => ({
|
|
1313
1399
|
slots: many(walkInInterviewCompanySlots)
|
|
@@ -1315,22 +1401,22 @@ var walkInInterviewCompaniesRelations = relations39(
|
|
|
1315
1401
|
);
|
|
1316
1402
|
|
|
1317
1403
|
// jobfair/walk-in-interview-company-slot.schema.ts
|
|
1318
|
-
var walkInInterviewCompanySlots =
|
|
1404
|
+
var walkInInterviewCompanySlots = pgTable49(
|
|
1319
1405
|
"walkInInterviewCompanySlots",
|
|
1320
1406
|
{
|
|
1321
|
-
id:
|
|
1322
|
-
companyId:
|
|
1407
|
+
id: text47("id").primaryKey(),
|
|
1408
|
+
companyId: text47("companyId").references(() => walkInInterviewCompanies.id, {
|
|
1323
1409
|
onDelete: "cascade"
|
|
1324
1410
|
}),
|
|
1325
|
-
startTime:
|
|
1326
|
-
endTime:
|
|
1327
|
-
isAvailable:
|
|
1328
|
-
createdAt:
|
|
1329
|
-
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()
|
|
1330
1416
|
},
|
|
1331
|
-
(table) => [
|
|
1417
|
+
(table) => [index36("walkInInterviewCompanySlots_companyId_idx").on(table.companyId)]
|
|
1332
1418
|
);
|
|
1333
|
-
var walkInInterviewCompanySlotsRelations =
|
|
1419
|
+
var walkInInterviewCompanySlotsRelations = relations42(
|
|
1334
1420
|
walkInInterviewCompanySlots,
|
|
1335
1421
|
({ one, many }) => ({
|
|
1336
1422
|
company: one(walkInInterviewCompanies, {
|
|
@@ -1342,30 +1428,30 @@ var walkInInterviewCompanySlotsRelations = relations40(
|
|
|
1342
1428
|
);
|
|
1343
1429
|
|
|
1344
1430
|
// jobfair/walk-in-interview-applicant.schema.ts
|
|
1345
|
-
var walkInInterviewApplicants =
|
|
1431
|
+
var walkInInterviewApplicants = pgTable50(
|
|
1346
1432
|
"walkInInterviewApplicants",
|
|
1347
1433
|
{
|
|
1348
|
-
id:
|
|
1349
|
-
userId:
|
|
1350
|
-
resumeUrl:
|
|
1434
|
+
id: text48("id").primaryKey(),
|
|
1435
|
+
userId: text48("userId").references(() => users.id, { onDelete: "cascade" }),
|
|
1436
|
+
resumeUrl: text48("resumeUrl"),
|
|
1351
1437
|
status: interviewApplicantStatusEnum("status").notNull().default("PENDING"),
|
|
1352
|
-
referralCode:
|
|
1353
|
-
appliedSessionId:
|
|
1438
|
+
referralCode: text48("referralCode"),
|
|
1439
|
+
appliedSessionId: text48("appliedSessionId").references(
|
|
1354
1440
|
() => walkInInterviewCompanySlots.id,
|
|
1355
1441
|
{ onDelete: "cascade" }
|
|
1356
1442
|
),
|
|
1357
|
-
appliedAt:
|
|
1358
|
-
createdAt:
|
|
1359
|
-
updatedAt:
|
|
1443
|
+
appliedAt: timestamp50("appliedAt"),
|
|
1444
|
+
createdAt: timestamp50("createdAt").notNull().defaultNow(),
|
|
1445
|
+
updatedAt: timestamp50("updatedAt").notNull().defaultNow()
|
|
1360
1446
|
},
|
|
1361
1447
|
(table) => [
|
|
1362
|
-
|
|
1448
|
+
index37("walkInInterviewApplicants_userId_idx").on(table.userId),
|
|
1363
1449
|
uniqueIndex2("walkInInterviewApplicants_appliedSessionId_unique_idx").on(
|
|
1364
1450
|
table.appliedSessionId
|
|
1365
1451
|
)
|
|
1366
1452
|
]
|
|
1367
1453
|
);
|
|
1368
|
-
var walkInInterviewApplicantsRelations =
|
|
1454
|
+
var walkInInterviewApplicantsRelations = relations43(
|
|
1369
1455
|
walkInInterviewApplicants,
|
|
1370
1456
|
({ one }) => ({
|
|
1371
1457
|
user: one(users, {
|
|
@@ -1380,140 +1466,178 @@ var walkInInterviewApplicantsRelations = relations41(
|
|
|
1380
1466
|
);
|
|
1381
1467
|
|
|
1382
1468
|
// cvclinic/cv-clinic-claim.schema.ts
|
|
1383
|
-
import { pgTable as
|
|
1469
|
+
import { pgTable as pgTable52, text as text50, timestamp as timestamp51 } from "drizzle-orm/pg-core";
|
|
1384
1470
|
|
|
1385
1471
|
// cvclinic/cv-clinic-vouchers.schema.ts
|
|
1386
|
-
import { pgTable as
|
|
1387
|
-
var cvClinicVouchers =
|
|
1388
|
-
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()
|
|
1389
1475
|
});
|
|
1390
1476
|
|
|
1391
1477
|
// cvclinic/cv-clinic-claim.schema.ts
|
|
1392
|
-
var cvClinicClaims =
|
|
1393
|
-
id:
|
|
1394
|
-
userId:
|
|
1395
|
-
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, {
|
|
1396
1482
|
onDelete: "set null"
|
|
1397
1483
|
}),
|
|
1398
|
-
createdAt:
|
|
1399
|
-
updatedAt:
|
|
1484
|
+
createdAt: timestamp51("created_at").notNull().defaultNow(),
|
|
1485
|
+
updatedAt: timestamp51("updated_at").notNull().defaultNow()
|
|
1400
1486
|
});
|
|
1401
1487
|
|
|
1488
|
+
// voting/competition-showcase.schema.ts
|
|
1489
|
+
import { pgTable as pgTable53, text as text51, timestamp as timestamp52, uniqueIndex as uniqueIndex3 } from "drizzle-orm/pg-core";
|
|
1490
|
+
var competitionShowcases = pgTable53(
|
|
1491
|
+
"competition_showcases",
|
|
1492
|
+
{
|
|
1493
|
+
id: text51("id").primaryKey(),
|
|
1494
|
+
slug: text51("slug").unique(),
|
|
1495
|
+
name: text51("name").notNull(),
|
|
1496
|
+
createdAt: timestamp52("created_at").notNull().defaultNow(),
|
|
1497
|
+
updatedAt: timestamp52("updated_at").notNull().defaultNow()
|
|
1498
|
+
},
|
|
1499
|
+
(table) => [uniqueIndex3("competition_showcases_name_unique").on(table.name)]
|
|
1500
|
+
);
|
|
1501
|
+
|
|
1402
1502
|
// voting/nominee.schema.ts
|
|
1403
|
-
import { boolean as
|
|
1404
|
-
var nominees =
|
|
1405
|
-
id:
|
|
1503
|
+
import { boolean as boolean16, integer as integer8, pgTable as pgTable54, text as text52, timestamp as timestamp53 } from "drizzle-orm/pg-core";
|
|
1504
|
+
var nominees = pgTable54("nominees", {
|
|
1505
|
+
id: text52("id").primaryKey(),
|
|
1406
1506
|
type: nomineeTypeEnum("type").notNull(),
|
|
1407
|
-
name:
|
|
1408
|
-
developer:
|
|
1409
|
-
description:
|
|
1410
|
-
thumbnailUrl:
|
|
1411
|
-
url:
|
|
1412
|
-
isActive:
|
|
1507
|
+
name: text52("name").notNull(),
|
|
1508
|
+
developer: text52("developer").notNull(),
|
|
1509
|
+
description: text52("description"),
|
|
1510
|
+
thumbnailUrl: text52("thumbnail_url"),
|
|
1511
|
+
url: text52("url"),
|
|
1512
|
+
isActive: boolean16("is_active").notNull().default(true),
|
|
1413
1513
|
point: integer8("point").notNull().default(0),
|
|
1414
|
-
deletedAt:
|
|
1415
|
-
createdAt:
|
|
1416
|
-
updatedAt:
|
|
1514
|
+
deletedAt: timestamp53("deleted_at"),
|
|
1515
|
+
createdAt: timestamp53("created_at").notNull().defaultNow(),
|
|
1516
|
+
updatedAt: timestamp53("updated_at").notNull().defaultNow()
|
|
1417
1517
|
});
|
|
1418
1518
|
|
|
1419
1519
|
// voting/nominee-vote.schema.ts
|
|
1420
|
-
import { pgTable as
|
|
1421
|
-
var nomineeVotes =
|
|
1422
|
-
id:
|
|
1423
|
-
userId:
|
|
1520
|
+
import { pgTable as pgTable55, text as text53, timestamp as timestamp54 } from "drizzle-orm/pg-core";
|
|
1521
|
+
var nomineeVotes = pgTable55("nominee_votes", {
|
|
1522
|
+
id: text53("id").primaryKey(),
|
|
1523
|
+
userId: text53("user_id").notNull().references(() => users.id, { onDelete: "cascade" }),
|
|
1424
1524
|
type: nomineeTypeEnum("type").notNull(),
|
|
1425
|
-
firstChoiceNomineeId:
|
|
1426
|
-
secondChoiceNomineeId:
|
|
1427
|
-
thirdChoiceNomineeId:
|
|
1428
|
-
createdAt:
|
|
1429
|
-
updatedAt:
|
|
1525
|
+
firstChoiceNomineeId: text53("first_choice_nominee_id").notNull().references(() => nominees.id, { onDelete: "cascade" }),
|
|
1526
|
+
secondChoiceNomineeId: text53("second_choice_nominee_id").notNull().references(() => nominees.id, { onDelete: "cascade" }),
|
|
1527
|
+
thirdChoiceNomineeId: text53("third_choice_nominee_id").notNull().references(() => nominees.id, { onDelete: "cascade" }),
|
|
1528
|
+
createdAt: timestamp54("created_at").notNull().defaultNow(),
|
|
1529
|
+
updatedAt: timestamp54("updated_at").notNull().defaultNow()
|
|
1430
1530
|
});
|
|
1431
1531
|
|
|
1432
1532
|
// voting/project.schema.ts
|
|
1433
|
-
import { integer as integer9, pgTable as
|
|
1434
|
-
var projects =
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1533
|
+
import { integer as integer9, pgTable as pgTable56, text as text54, timestamp as timestamp55, uniqueIndex as uniqueIndex4 } from "drizzle-orm/pg-core";
|
|
1534
|
+
var projects = pgTable56(
|
|
1535
|
+
"projects",
|
|
1536
|
+
{
|
|
1537
|
+
id: text54("id").primaryKey(),
|
|
1538
|
+
slug: text54("slug").notNull().unique(),
|
|
1539
|
+
name: text54("name").notNull(),
|
|
1540
|
+
type: nomineeTypeEnum("type").notNull(),
|
|
1541
|
+
imageUrl: text54("image_url"),
|
|
1542
|
+
description: text54("description"),
|
|
1543
|
+
youtubeUrl: text54("youtube_url"),
|
|
1544
|
+
externalUrl: text54("external_url"),
|
|
1545
|
+
teamName: text54("team_name").notNull(),
|
|
1546
|
+
votes: integer9("votes").notNull().default(0),
|
|
1547
|
+
deletedAt: timestamp55("deleted_at"),
|
|
1548
|
+
createdAt: timestamp55("created_at").notNull().defaultNow(),
|
|
1549
|
+
updatedAt: timestamp55("updated_at").notNull().defaultNow()
|
|
1550
|
+
},
|
|
1551
|
+
(table) => [uniqueIndex4("projects_type_name_unique").on(table.type, table.name)]
|
|
1552
|
+
);
|
|
1553
|
+
|
|
1554
|
+
// voting/project-vote.schema.ts
|
|
1555
|
+
import { index as index38, pgTable as pgTable57, text as text55, timestamp as timestamp56, uniqueIndex as uniqueIndex5 } from "drizzle-orm/pg-core";
|
|
1556
|
+
var projectVotes = pgTable57(
|
|
1557
|
+
"project_votes",
|
|
1558
|
+
{
|
|
1559
|
+
id: text55("id").primaryKey(),
|
|
1560
|
+
userId: text55("user_id").notNull().references(() => users.id, { onDelete: "cascade" }),
|
|
1561
|
+
projectId: text55("project_id").notNull().references(() => projects.id, { onDelete: "cascade" }),
|
|
1562
|
+
type: nomineeTypeEnum("type").notNull(),
|
|
1563
|
+
createdAt: timestamp56("created_at").notNull().defaultNow()
|
|
1564
|
+
},
|
|
1565
|
+
(table) => [
|
|
1566
|
+
uniqueIndex5("project_votes_user_project_unique").on(table.userId, table.projectId),
|
|
1567
|
+
index38("project_votes_user_type_idx").on(table.userId, table.type),
|
|
1568
|
+
index38("project_votes_project_idx").on(table.projectId)
|
|
1569
|
+
]
|
|
1570
|
+
);
|
|
1447
1571
|
|
|
1448
1572
|
// booth/exhibitor.schema.ts
|
|
1449
|
-
import { index as
|
|
1450
|
-
var exhibitors =
|
|
1573
|
+
import { index as index39, pgTable as pgTable58, text as text56, timestamp as timestamp57 } from "drizzle-orm/pg-core";
|
|
1574
|
+
var exhibitors = pgTable58(
|
|
1451
1575
|
"exhibitors",
|
|
1452
1576
|
{
|
|
1453
|
-
id:
|
|
1454
|
-
companyName:
|
|
1455
|
-
name:
|
|
1456
|
-
email:
|
|
1457
|
-
phoneNumber:
|
|
1458
|
-
deletedAt:
|
|
1459
|
-
createdAt:
|
|
1460
|
-
updatedAt:
|
|
1577
|
+
id: text56("id").primaryKey(),
|
|
1578
|
+
companyName: text56("company_name").notNull(),
|
|
1579
|
+
name: text56("name").notNull(),
|
|
1580
|
+
email: text56("email").notNull(),
|
|
1581
|
+
phoneNumber: text56("phone_number").notNull(),
|
|
1582
|
+
deletedAt: timestamp57("deleted_at"),
|
|
1583
|
+
createdAt: timestamp57("created_at").notNull().defaultNow(),
|
|
1584
|
+
updatedAt: timestamp57("updated_at").notNull().defaultNow()
|
|
1461
1585
|
},
|
|
1462
1586
|
(table) => [
|
|
1463
|
-
|
|
1464
|
-
|
|
1587
|
+
index39("exhibitors_company_name_idx").on(table.companyName),
|
|
1588
|
+
index39("exhibitors_email_idx").on(table.email)
|
|
1465
1589
|
]
|
|
1466
1590
|
);
|
|
1467
1591
|
|
|
1468
1592
|
// booth/main-event-booth-reward.schema.ts
|
|
1469
|
-
import { index as
|
|
1470
|
-
var mainEventBoothRewards =
|
|
1593
|
+
import { index as index40, integer as integer10, pgTable as pgTable59, text as text57, timestamp as timestamp58 } from "drizzle-orm/pg-core";
|
|
1594
|
+
var mainEventBoothRewards = pgTable59(
|
|
1471
1595
|
"main_event_booth_rewards",
|
|
1472
1596
|
{
|
|
1473
|
-
id:
|
|
1474
|
-
companyName:
|
|
1475
|
-
description:
|
|
1597
|
+
id: text57("id").primaryKey(),
|
|
1598
|
+
companyName: text57("company_name").notNull(),
|
|
1599
|
+
description: text57("description").notNull(),
|
|
1476
1600
|
points: integer10("points").notNull(),
|
|
1477
1601
|
type: boothRewardTypeEnum("type").notNull(),
|
|
1478
|
-
createdAt:
|
|
1479
|
-
updatedAt:
|
|
1602
|
+
createdAt: timestamp58("created_at").notNull().defaultNow(),
|
|
1603
|
+
updatedAt: timestamp58("updated_at").notNull().defaultNow()
|
|
1480
1604
|
},
|
|
1481
1605
|
(table) => [
|
|
1482
|
-
|
|
1483
|
-
|
|
1606
|
+
index40("main_event_booth_rewards_company_name_idx").on(table.companyName),
|
|
1607
|
+
index40("main_event_booth_rewards_type_idx").on(table.type)
|
|
1484
1608
|
]
|
|
1485
1609
|
);
|
|
1486
1610
|
|
|
1487
1611
|
// supermarket/supermarket-item.schema.ts
|
|
1488
|
-
import { decimal, integer as integer11, pgTable as
|
|
1489
|
-
var supermarketItems =
|
|
1490
|
-
id:
|
|
1491
|
-
name:
|
|
1492
|
-
description:
|
|
1612
|
+
import { decimal, integer as integer11, pgTable as pgTable60, text as text58, timestamp as timestamp59 } from "drizzle-orm/pg-core";
|
|
1613
|
+
var supermarketItems = pgTable60("supermarket_items", {
|
|
1614
|
+
id: text58("id").primaryKey(),
|
|
1615
|
+
name: text58("name").notNull(),
|
|
1616
|
+
description: text58("description"),
|
|
1493
1617
|
price: decimal("price", { precision: 10, scale: 2 }).notNull(),
|
|
1494
1618
|
stock: integer11("stock").notNull().default(0),
|
|
1495
|
-
category:
|
|
1496
|
-
imageUrl:
|
|
1497
|
-
deletedAt:
|
|
1619
|
+
category: text58("category").notNull(),
|
|
1620
|
+
imageUrl: text58("image_url"),
|
|
1621
|
+
deletedAt: timestamp59("deleted_at"),
|
|
1498
1622
|
// Soft delete
|
|
1499
|
-
createdAt:
|
|
1500
|
-
updatedAt:
|
|
1623
|
+
createdAt: timestamp59("created_at").notNull().defaultNow(),
|
|
1624
|
+
updatedAt: timestamp59("updated_at").notNull().defaultNow()
|
|
1501
1625
|
});
|
|
1502
1626
|
|
|
1503
1627
|
// supermarket/supermarket-item-option.schema.ts
|
|
1504
|
-
import { relations as
|
|
1505
|
-
import { pgTable as
|
|
1506
|
-
var supermarketItemOptions =
|
|
1507
|
-
id:
|
|
1508
|
-
itemId:
|
|
1509
|
-
key:
|
|
1510
|
-
value:
|
|
1511
|
-
deletedAt:
|
|
1628
|
+
import { relations as relations44 } from "drizzle-orm";
|
|
1629
|
+
import { pgTable as pgTable61, text as text59, timestamp as timestamp60 } from "drizzle-orm/pg-core";
|
|
1630
|
+
var supermarketItemOptions = pgTable61("supermarket_item_options", {
|
|
1631
|
+
id: text59("id").primaryKey(),
|
|
1632
|
+
itemId: text59("item_id").notNull().references(() => supermarketItems.id, { onDelete: "cascade" }),
|
|
1633
|
+
key: text59("key").notNull(),
|
|
1634
|
+
value: text59("value").notNull(),
|
|
1635
|
+
deletedAt: timestamp60("deleted_at"),
|
|
1512
1636
|
// Soft delete
|
|
1513
|
-
createdAt:
|
|
1514
|
-
updatedAt:
|
|
1637
|
+
createdAt: timestamp60("created_at").notNull().defaultNow(),
|
|
1638
|
+
updatedAt: timestamp60("updated_at").notNull().defaultNow()
|
|
1515
1639
|
});
|
|
1516
|
-
var supermarketItemOptionsRelations =
|
|
1640
|
+
var supermarketItemOptionsRelations = relations44(supermarketItemOptions, ({ one }) => ({
|
|
1517
1641
|
item: one(supermarketItems, {
|
|
1518
1642
|
fields: [supermarketItemOptions.itemId],
|
|
1519
1643
|
references: [supermarketItems.id]
|
|
@@ -1521,25 +1645,25 @@ var supermarketItemOptionsRelations = relations42(supermarketItemOptions, ({ one
|
|
|
1521
1645
|
}));
|
|
1522
1646
|
|
|
1523
1647
|
// supermarket/supermarket-user-cart.schema.ts
|
|
1524
|
-
import { relations as
|
|
1525
|
-
import { decimal as decimal2, pgTable as
|
|
1648
|
+
import { relations as relations46 } from "drizzle-orm";
|
|
1649
|
+
import { decimal as decimal2, pgTable as pgTable63, text as text61, timestamp as timestamp62 } from "drizzle-orm/pg-core";
|
|
1526
1650
|
|
|
1527
1651
|
// supermarket/supermarket-user-cart-item.schema.ts
|
|
1528
|
-
import { relations as
|
|
1529
|
-
import { integer as integer12, json as json3, pgTable as
|
|
1530
|
-
var supermarketUserCartItems =
|
|
1531
|
-
id:
|
|
1532
|
-
cartId:
|
|
1533
|
-
itemId:
|
|
1652
|
+
import { relations as relations45 } from "drizzle-orm";
|
|
1653
|
+
import { integer as integer12, json as json3, pgTable as pgTable62, text as text60, timestamp as timestamp61 } from "drizzle-orm/pg-core";
|
|
1654
|
+
var supermarketUserCartItems = pgTable62("supermarket_user_cart_items", {
|
|
1655
|
+
id: text60("id").primaryKey(),
|
|
1656
|
+
cartId: text60("cart_id").notNull().references(() => supermarketUserCarts.id, { onDelete: "cascade" }),
|
|
1657
|
+
itemId: text60("item_id").notNull().references(() => supermarketItems.id, { onDelete: "cascade" }),
|
|
1534
1658
|
quantity: integer12("quantity").notNull().default(1),
|
|
1535
1659
|
selectedOptions: json3("selected_options"),
|
|
1536
1660
|
// JSON to store selected option key-value pairs
|
|
1537
|
-
deletedAt:
|
|
1661
|
+
deletedAt: timestamp61("deleted_at"),
|
|
1538
1662
|
// Soft delete
|
|
1539
|
-
createdAt:
|
|
1540
|
-
updatedAt:
|
|
1663
|
+
createdAt: timestamp61("created_at").notNull().defaultNow(),
|
|
1664
|
+
updatedAt: timestamp61("updated_at").notNull().defaultNow()
|
|
1541
1665
|
});
|
|
1542
|
-
var supermarketUserCartItemsRelations =
|
|
1666
|
+
var supermarketUserCartItemsRelations = relations45(supermarketUserCartItems, ({ one }) => ({
|
|
1543
1667
|
cart: one(supermarketUserCarts, {
|
|
1544
1668
|
fields: [supermarketUserCartItems.cartId],
|
|
1545
1669
|
references: [supermarketUserCarts.id]
|
|
@@ -1551,82 +1675,82 @@ var supermarketUserCartItemsRelations = relations43(supermarketUserCartItems, ({
|
|
|
1551
1675
|
}));
|
|
1552
1676
|
|
|
1553
1677
|
// supermarket/supermarket-user-cart.schema.ts
|
|
1554
|
-
var supermarketUserCarts =
|
|
1555
|
-
id:
|
|
1556
|
-
userId:
|
|
1678
|
+
var supermarketUserCarts = pgTable63("supermarket_user_carts", {
|
|
1679
|
+
id: text61("id").primaryKey(),
|
|
1680
|
+
userId: text61("user_id").notNull().references(() => users.id, { onDelete: "cascade" }),
|
|
1557
1681
|
totalPrice: decimal2("total_price", { precision: 10, scale: 2 }).notNull(),
|
|
1558
1682
|
status: cartStatusEnum("status").notNull().default("PENDING"),
|
|
1559
|
-
deletedAt:
|
|
1683
|
+
deletedAt: timestamp62("deleted_at"),
|
|
1560
1684
|
// Soft delete
|
|
1561
|
-
createdAt:
|
|
1562
|
-
updatedAt:
|
|
1685
|
+
createdAt: timestamp62("created_at").notNull().defaultNow(),
|
|
1686
|
+
updatedAt: timestamp62("updated_at").notNull().defaultNow()
|
|
1563
1687
|
});
|
|
1564
|
-
var supermarketUserCartsRelations =
|
|
1688
|
+
var supermarketUserCartsRelations = relations46(supermarketUserCarts, ({ many }) => ({
|
|
1565
1689
|
cartItems: many(supermarketUserCartItems)
|
|
1566
1690
|
}));
|
|
1567
1691
|
|
|
1568
1692
|
// content/article.schema.ts
|
|
1569
|
-
import { pgTable as
|
|
1570
|
-
var articles =
|
|
1571
|
-
id:
|
|
1572
|
-
title:
|
|
1573
|
-
description:
|
|
1574
|
-
url:
|
|
1575
|
-
imageUrl:
|
|
1576
|
-
deletedAt:
|
|
1577
|
-
createdAt:
|
|
1578
|
-
updatedAt:
|
|
1693
|
+
import { pgTable as pgTable64, text as text62, timestamp as timestamp63 } from "drizzle-orm/pg-core";
|
|
1694
|
+
var articles = pgTable64("articles", {
|
|
1695
|
+
id: text62("id").primaryKey(),
|
|
1696
|
+
title: text62("title").notNull(),
|
|
1697
|
+
description: text62("description"),
|
|
1698
|
+
url: text62("url").notNull(),
|
|
1699
|
+
imageUrl: text62("image_url"),
|
|
1700
|
+
deletedAt: timestamp63("deleted_at"),
|
|
1701
|
+
createdAt: timestamp63("created_at").notNull().defaultNow(),
|
|
1702
|
+
updatedAt: timestamp63("updated_at").notNull().defaultNow()
|
|
1579
1703
|
});
|
|
1580
1704
|
|
|
1581
1705
|
// content/explore-it-funfact.schema.ts
|
|
1582
|
-
import { pgTable as
|
|
1583
|
-
var exploreITFunfacts =
|
|
1584
|
-
id:
|
|
1585
|
-
title:
|
|
1586
|
-
content:
|
|
1587
|
-
imageUrl:
|
|
1588
|
-
deletedAt:
|
|
1589
|
-
createdAt:
|
|
1590
|
-
updatedAt:
|
|
1706
|
+
import { pgTable as pgTable65, text as text63, timestamp as timestamp64 } from "drizzle-orm/pg-core";
|
|
1707
|
+
var exploreITFunfacts = pgTable65("explore_it_funfacts", {
|
|
1708
|
+
id: text63("id").primaryKey(),
|
|
1709
|
+
title: text63("title").notNull(),
|
|
1710
|
+
content: text63("content").notNull(),
|
|
1711
|
+
imageUrl: text63("image_url"),
|
|
1712
|
+
deletedAt: timestamp64("deleted_at"),
|
|
1713
|
+
createdAt: timestamp64("created_at").notNull().defaultNow(),
|
|
1714
|
+
updatedAt: timestamp64("updated_at").notNull().defaultNow()
|
|
1591
1715
|
});
|
|
1592
1716
|
|
|
1593
1717
|
// notifications/dashboard-notification.schema.ts
|
|
1594
|
-
import { boolean as
|
|
1595
|
-
var dashboardNotifications =
|
|
1718
|
+
import { boolean as boolean17, index as index41, pgTable as pgTable66, text as text64, timestamp as timestamp65 } from "drizzle-orm/pg-core";
|
|
1719
|
+
var dashboardNotifications = pgTable66(
|
|
1596
1720
|
"dashboard_notifications",
|
|
1597
1721
|
{
|
|
1598
|
-
id:
|
|
1599
|
-
title:
|
|
1600
|
-
content:
|
|
1601
|
-
isPrivate:
|
|
1602
|
-
type:
|
|
1722
|
+
id: text64("id").primaryKey(),
|
|
1723
|
+
title: text64("title").notNull(),
|
|
1724
|
+
content: text64("content").notNull(),
|
|
1725
|
+
isPrivate: boolean17("is_private").notNull().default(false),
|
|
1726
|
+
type: text64("type").notNull(),
|
|
1603
1727
|
programCode: programCodeEnum("program_code"),
|
|
1604
|
-
deletedAt:
|
|
1605
|
-
createdAt:
|
|
1606
|
-
updatedAt:
|
|
1728
|
+
deletedAt: timestamp65("deleted_at"),
|
|
1729
|
+
createdAt: timestamp65("created_at").notNull().defaultNow(),
|
|
1730
|
+
updatedAt: timestamp65("updated_at").notNull().defaultNow()
|
|
1607
1731
|
},
|
|
1608
|
-
(table) => [
|
|
1732
|
+
(table) => [index41("dashboard_notifications_program_code_idx").on(table.programCode)]
|
|
1609
1733
|
);
|
|
1610
1734
|
|
|
1611
1735
|
// notifications/dashboard-notification-user-read.schema.ts
|
|
1612
|
-
import { relations as
|
|
1613
|
-
import { boolean as
|
|
1614
|
-
var dashboardNotificationUserReads =
|
|
1736
|
+
import { relations as relations47 } from "drizzle-orm";
|
|
1737
|
+
import { boolean as boolean18, index as index42, pgTable as pgTable67, text as text65, timestamp as timestamp66 } from "drizzle-orm/pg-core";
|
|
1738
|
+
var dashboardNotificationUserReads = pgTable67(
|
|
1615
1739
|
"dashboard_notification_user_reads",
|
|
1616
1740
|
{
|
|
1617
|
-
id:
|
|
1618
|
-
userId:
|
|
1619
|
-
notificationId:
|
|
1620
|
-
isOpened:
|
|
1621
|
-
createdAt:
|
|
1622
|
-
updatedAt:
|
|
1741
|
+
id: text65("id").primaryKey(),
|
|
1742
|
+
userId: text65("user_id").notNull().references(() => users.id, { onDelete: "cascade" }),
|
|
1743
|
+
notificationId: text65("notification_id").notNull().references(() => dashboardNotifications.id, { onDelete: "cascade" }),
|
|
1744
|
+
isOpened: boolean18("is_opened").notNull().default(false),
|
|
1745
|
+
createdAt: timestamp66("created_at").notNull().defaultNow(),
|
|
1746
|
+
updatedAt: timestamp66("updated_at").notNull().defaultNow()
|
|
1623
1747
|
},
|
|
1624
1748
|
(table) => [
|
|
1625
|
-
|
|
1626
|
-
|
|
1749
|
+
index42("dashboard_notification_user_reads_user_id_idx").on(table.userId),
|
|
1750
|
+
index42("dashboard_notification_user_reads_notification_id_idx").on(table.notificationId)
|
|
1627
1751
|
]
|
|
1628
1752
|
);
|
|
1629
|
-
var dashboardNotificationUserReadsRelations =
|
|
1753
|
+
var dashboardNotificationUserReadsRelations = relations47(
|
|
1630
1754
|
dashboardNotificationUserReads,
|
|
1631
1755
|
({ one }) => ({
|
|
1632
1756
|
user: one(users, {
|
|
@@ -1641,32 +1765,32 @@ var dashboardNotificationUserReadsRelations = relations45(
|
|
|
1641
1765
|
);
|
|
1642
1766
|
|
|
1643
1767
|
// post-example/comment.schema.ts
|
|
1644
|
-
import { pgTable as
|
|
1645
|
-
var comments =
|
|
1768
|
+
import { pgTable as pgTable68, text as text66, uuid as uuid10 } from "drizzle-orm/pg-core";
|
|
1769
|
+
var comments = pgTable68("comments", {
|
|
1646
1770
|
id: uuid10("id").primaryKey(),
|
|
1647
1771
|
postId: uuid10("post_id").notNull(),
|
|
1648
|
-
content:
|
|
1649
|
-
author:
|
|
1772
|
+
content: text66("content").notNull(),
|
|
1773
|
+
author: text66("author").notNull()
|
|
1650
1774
|
});
|
|
1651
1775
|
|
|
1652
1776
|
// post-example/like.schema.ts
|
|
1653
|
-
import { pgTable as
|
|
1654
|
-
var likes =
|
|
1777
|
+
import { pgTable as pgTable69, text as text67, uuid as uuid11 } from "drizzle-orm/pg-core";
|
|
1778
|
+
var likes = pgTable69("likes", {
|
|
1655
1779
|
id: uuid11("id").primaryKey(),
|
|
1656
1780
|
postId: uuid11("post_id").notNull(),
|
|
1657
|
-
userName:
|
|
1781
|
+
userName: text67("user_name").notNull()
|
|
1658
1782
|
});
|
|
1659
1783
|
|
|
1660
1784
|
// post-example/post.schema.ts
|
|
1661
|
-
import { pgTable as
|
|
1662
|
-
var posts =
|
|
1785
|
+
import { pgTable as pgTable70, text as text68, timestamp as timestamp67, uuid as uuid12 } from "drizzle-orm/pg-core";
|
|
1786
|
+
var posts = pgTable70("posts", {
|
|
1663
1787
|
id: uuid12("id").primaryKey(),
|
|
1664
1788
|
// Primary Key UUID
|
|
1665
|
-
title:
|
|
1666
|
-
content:
|
|
1667
|
-
author:
|
|
1668
|
-
createdAt:
|
|
1669
|
-
updatedAt:
|
|
1789
|
+
title: text68("title").notNull(),
|
|
1790
|
+
content: text68("content").notNull(),
|
|
1791
|
+
author: text68("author").notNull(),
|
|
1792
|
+
createdAt: timestamp67("created_at").defaultNow().notNull(),
|
|
1793
|
+
updatedAt: timestamp67("updated_at").defaultNow().notNull()
|
|
1670
1794
|
});
|
|
1671
1795
|
export {
|
|
1672
1796
|
adWatchHistories,
|
|
@@ -1683,6 +1807,9 @@ export {
|
|
|
1683
1807
|
companyExhibitionVacancies,
|
|
1684
1808
|
companyExhibitionVacanciesRelations,
|
|
1685
1809
|
companyExhibitions,
|
|
1810
|
+
competitionPaymentProofs,
|
|
1811
|
+
competitionPaymentProofsRelations,
|
|
1812
|
+
competitionShowcases,
|
|
1686
1813
|
cvClinicClaims,
|
|
1687
1814
|
cvClinicVouchers,
|
|
1688
1815
|
dashboardNotificationUserReads,
|
|
@@ -1717,6 +1844,7 @@ export {
|
|
|
1717
1844
|
grandLaunchingRegistrations,
|
|
1718
1845
|
grandLaunchingRegistrationsRelations,
|
|
1719
1846
|
interviewApplicantStatusEnum,
|
|
1847
|
+
joinRequestStatusEnum,
|
|
1720
1848
|
knowEventSourceEnum,
|
|
1721
1849
|
leaderboardHistories,
|
|
1722
1850
|
likes,
|
|
@@ -1763,6 +1891,7 @@ export {
|
|
|
1763
1891
|
programTypeEnum,
|
|
1764
1892
|
programs,
|
|
1765
1893
|
programsRelations,
|
|
1894
|
+
projectVotes,
|
|
1766
1895
|
projects,
|
|
1767
1896
|
questionTypeEnum,
|
|
1768
1897
|
rewardTypeEnum,
|
|
@@ -1777,6 +1906,8 @@ export {
|
|
|
1777
1906
|
supermarketUserCartItemsRelations,
|
|
1778
1907
|
supermarketUserCarts,
|
|
1779
1908
|
supermarketUserCartsRelations,
|
|
1909
|
+
teamJoinRequests,
|
|
1910
|
+
teamJoinRequestsRelations,
|
|
1780
1911
|
teamStatusEnum,
|
|
1781
1912
|
teams,
|
|
1782
1913
|
teamsRelations,
|