This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// schema/entities/base.ts | |
export const getBaseEntityProps = () => ({ | |
id: uuid("id") | |
.default(sql`gen_random_uuid()`) | |
.primaryKey(), | |
createdAt: timestamp("created_at", { precision: 3 }).notNull().defaultNow(), | |
}); | |
export const getOwnedBaseEntityProps = () => ({ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { and, type DBQueryConfig, eq, type SQLWrapper } from "drizzle-orm"; | |
import { drizzle } from "drizzle-orm/postgres-js"; | |
import postgres, { type Sql } from "postgres"; | |
import { type AnyArgs } from "@/common"; | |
import { | |
type DbClient, | |
type DbTable, | |
type DeleteArgs, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"lastUpload":"2017-02-06T00:36:40.699Z","extensionVersion":"v2.4.3"} |