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