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