added schema
This commit is contained in:
parent
38b514f3a9
commit
f3416f86f6
2 changed files with 51 additions and 26 deletions
|
|
@ -13,6 +13,7 @@ const app = new Elysia()
|
|||
"https://dashboard.planpostai.com",
|
||||
"https://dev.dashboard.planpostai.com",
|
||||
"https://canvas.planpostai.com",
|
||||
"https://canvasdev.planpostai.com",
|
||||
],
|
||||
methods: ["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS"],
|
||||
allowedHeaders: [
|
||||
|
|
|
|||
|
|
@ -1,4 +1,13 @@
|
|||
import { boolean, integer, json, pgTable, text, timestamp, uuid, jsonb } from "drizzle-orm/pg-core";
|
||||
import {
|
||||
boolean,
|
||||
integer,
|
||||
json,
|
||||
pgTable,
|
||||
text,
|
||||
timestamp,
|
||||
uuid,
|
||||
jsonb,
|
||||
} from "drizzle-orm/pg-core";
|
||||
|
||||
export const users = pgTable("users", {
|
||||
id: text("user_id").primaryKey().notNull(),
|
||||
|
|
@ -33,3 +42,18 @@ export const uploads = pgTable("uploads", {
|
|||
created_at: timestamp("created_at").defaultNow(),
|
||||
updated_at: timestamp("updated_at").defaultNow(),
|
||||
});
|
||||
|
||||
export const shapes = pgTable("shapes", {
|
||||
id: uuid("shape_id").defaultRandom().primaryKey(),
|
||||
shapes: text("shapes").notNull(),
|
||||
created_at: timestamp("created_at").defaultNow(),
|
||||
updated_at: timestamp("updated_at").defaultNow(),
|
||||
});
|
||||
|
||||
export const category = pgTable("project_category", {
|
||||
id: uuid("category_id").defaultRandom().primaryKey(),
|
||||
user_id: uuid().references(() => users.id),
|
||||
category: text("category").notNull(),
|
||||
created_at: timestamp("created_at").defaultNow(),
|
||||
updated_at: timestamp("updated_at").defaultNow(),
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue