chore: ran biome format

This commit is contained in:
John Yeo
2025-09-22 14:45:25 +01:00
parent db19928cea
commit da2693567c
1358 changed files with 112670 additions and 112585 deletions

View File

@@ -1,47 +1,47 @@
import {
text,
foreignKey,
pgTable,
numeric,
primaryKey,
unique,
text,
foreignKey,
pgTable,
numeric,
primaryKey,
unique,
} from "drizzle-orm/pg-core";
import { customers } from "../../cusModels/cusTable.js";
import { rewardPrograms } from "../rewardProgramModels/rewardProgramTable.js";
import { organizations } from "../../orgModels/orgTable.js";
export const referralCodes = pgTable(
"referral_codes",
{
code: text().notNull(),
org_id: text("org_id").notNull(),
env: text().notNull(),
internal_customer_id: text("internal_customer_id"),
internal_reward_program_id: text("internal_reward_program_id"),
id: text().notNull(),
created_at: numeric({ mode: "number" }),
},
"referral_codes",
{
code: text().notNull(),
org_id: text("org_id").notNull(),
env: text().notNull(),
internal_customer_id: text("internal_customer_id"),
internal_reward_program_id: text("internal_reward_program_id"),
id: text().notNull(),
created_at: numeric({ mode: "number" }),
},
(table) => [
foreignKey({
columns: [table.internal_customer_id],
foreignColumns: [customers.internal_id],
name: "referral_codes_internal_customer_id_fkey",
}).onDelete("cascade"),
foreignKey({
columns: [table.internal_reward_program_id],
foreignColumns: [rewardPrograms.internal_id],
name: "referral_codes_internal_reward_program_id_fkey",
}).onDelete("cascade"),
foreignKey({
columns: [table.org_id],
foreignColumns: [organizations.id],
name: "referral_codes_org_id_fkey",
}).onDelete("cascade"),
primaryKey({
columns: [table.code, table.org_id, table.env],
name: "referral_codes_pkey",
}),
unique("referral_codes_id_key").on(table.id),
],
(table) => [
foreignKey({
columns: [table.internal_customer_id],
foreignColumns: [customers.internal_id],
name: "referral_codes_internal_customer_id_fkey",
}).onDelete("cascade"),
foreignKey({
columns: [table.internal_reward_program_id],
foreignColumns: [rewardPrograms.internal_id],
name: "referral_codes_internal_reward_program_id_fkey",
}).onDelete("cascade"),
foreignKey({
columns: [table.org_id],
foreignColumns: [organizations.id],
name: "referral_codes_org_id_fkey",
}).onDelete("cascade"),
primaryKey({
columns: [table.code, table.org_id, table.env],
name: "referral_codes_pkey",
}),
unique("referral_codes_id_key").on(table.id),
],
);