- 일정 상세 조회 기능 구현 중
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { pgTable, foreignKey, uuid, text, date, boolean, varchar, index, time, primaryKey, pgSequence } from "drizzle-orm/pg-core"
|
||||
import { pgTable, varchar, date, boolean, timestamp, uuid, foreignKey, text, index, time, primaryKey, pgSequence } from "drizzle-orm/pg-core"
|
||||
import { sql } from "drizzle-orm"
|
||||
|
||||
|
||||
@@ -19,10 +19,23 @@ export const userBadgeIdSeq = pgSequence("user_badge_id_seq", { startWith: "1",
|
||||
export const userBlockingIdSeq = pgSequence("user_blocking_id_seq", { startWith: "1", increment: "1", minValue: "1", maxValue: "9223372036854775807", cache: "1", cycle: false })
|
||||
export const emailAddressIdSeq = pgSequence("email_address_id_seq", { startWith: "1", increment: "1", minValue: "1", maxValue: "9223372036854775807", cache: "1", cycle: false })
|
||||
|
||||
export const account = pgTable("account", {
|
||||
name: varchar().notNull(),
|
||||
email: varchar().notNull(),
|
||||
password: varchar().notNull(),
|
||||
birthday: date(),
|
||||
accountId: varchar("account_id").notNull(),
|
||||
nickname: varchar().notNull(),
|
||||
status: varchar().default('active').notNull(),
|
||||
isDeleted: boolean("is_deleted").default(false).notNull(),
|
||||
createdAt: timestamp("created_at", { mode: 'string' }).defaultNow().notNull(),
|
||||
id: uuid().default(sql`uuid_generate_v4()`).primaryKey().notNull(),
|
||||
});
|
||||
|
||||
export const comment = pgTable("comment", {
|
||||
id: uuid().default(sql`uuid_generate_v4()`).primaryKey().notNull(),
|
||||
content: text(),
|
||||
createdAt: date("created_at"),
|
||||
createdAt: timestamp("created_at", { mode: 'string' }),
|
||||
isDeleted: boolean("is_deleted").default(false),
|
||||
writerId: uuid("writer_id"),
|
||||
parentId: uuid("parent_id"),
|
||||
@@ -39,19 +52,6 @@ export const comment = pgTable("comment", {
|
||||
}),
|
||||
]);
|
||||
|
||||
export const account = pgTable("account", {
|
||||
name: varchar().notNull(),
|
||||
email: varchar().notNull(),
|
||||
password: varchar().notNull(),
|
||||
birthday: date(),
|
||||
accountId: varchar("account_id").notNull(),
|
||||
nickname: varchar().notNull(),
|
||||
status: varchar().default('active').notNull(),
|
||||
isDeleted: boolean("is_deleted").default(false).notNull(),
|
||||
createdAt: date("created_at").defaultNow().notNull(),
|
||||
id: uuid().default(sql`uuid_generate_v4()`).primaryKey().notNull(),
|
||||
});
|
||||
|
||||
export const participant = pgTable("participant", {
|
||||
participantId: uuid("participant_id").notNull(),
|
||||
scheduleId: uuid("schedule_id").notNull(),
|
||||
@@ -80,7 +80,7 @@ export const schedule = pgTable("schedule", {
|
||||
content: text(),
|
||||
isDeleted: boolean("is_deleted").default(false).notNull(),
|
||||
type: varchar().notNull(),
|
||||
createdAt: date("created_at"),
|
||||
createdAt: timestamp("created_at", { mode: 'string' }).defaultNow().notNull(),
|
||||
owner: uuid().notNull(),
|
||||
style: varchar().notNull(),
|
||||
startTime: time("start_time").notNull(),
|
||||
@@ -122,7 +122,7 @@ export const follow = pgTable("follow", {
|
||||
isDeleted: boolean("is_deleted").default(false),
|
||||
isAccepted: boolean("is_accepted").default(false),
|
||||
isLinked: boolean("is_linked").default(false),
|
||||
createdAt: date("created_at"),
|
||||
createdAt: timestamp("created_at", { mode: 'string' }).defaultNow().notNull(),
|
||||
following: uuid().notNull(),
|
||||
follower: uuid().notNull(),
|
||||
}, (table) => [
|
||||
|
||||
Reference in New Issue
Block a user