Pull Request branch dev-clone to main #1

Merged
gitea merged 429 commits from dev-clone into main 2024-12-23 09:31:34 +00:00
2 changed files with 34 additions and 0 deletions
Showing only changes of commit 233dcd8334 - Show all commits

View File

@ -0,0 +1,16 @@
import { createId } from "@paralleldrive/cuid2";
import {
pgTable,
timestamp,
varchar,
} from "drizzle-orm/pg-core";
export const aspects = pgTable("aspects", {
id: varchar("id", { length: 50 })
.primaryKey()
.$defaultFn(() => createId()),
name: varchar("name", { length: 255 }).notNull(),
createdAt: timestamp("created_at", { mode: "date" }).defaultNow(),
updatedAt: timestamp("updated_at", { mode: "date" }).defaultNow(),
deletedAt: timestamp("deleted_at", { mode: "date" }),
});

View File

@ -0,0 +1,18 @@
import { createId } from "@paralleldrive/cuid2";
import {
pgTable,
timestamp,
varchar,
} from "drizzle-orm/pg-core";
import { aspects } from "./aspects";
export const subAspects = pgTable("sub_aspects", {
id: varchar("id", {length: 50})
.primaryKey()
.$defaultFn(() => createId()),
name: varchar("name", { length: 255 }).notNull(),
createdAt: timestamp("createdAt", { mode: "date" }).defaultNow(),
updatedAt: timestamp("updatedAt", { mode: "date" }).defaultNow(),
deletedAt: timestamp("deletedAt", { mode: "date" }),
aspectId: varchar("aspectId").references(() => aspects.id)
});