mirror of
https://github.com/fosrl/pangolin.git
synced 2026-08-11 06:58:28 +02:00
Add documentation for creating new crud endpoints
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import { aiBudgetPeriods } from "@server/db/sqlite";
|
||||
import { randomUUID } from "crypto";
|
||||
import { InferSelectModel, sql } from "drizzle-orm";
|
||||
import {
|
||||
@@ -1747,15 +1746,6 @@ export const aiBudgets = pgTable(
|
||||
updatedAt: bigint("updatedAt", { mode: "number" }).notNull()
|
||||
},
|
||||
(t) => [
|
||||
check(
|
||||
"ai_budget_one_scope",
|
||||
sql`(
|
||||
(CASE WHEN ${t.providerId} IS NOT NULL THEN 1 ELSE 0 END) +
|
||||
(CASE WHEN ${t.modelId} IS NOT NULL THEN 1 ELSE 0 END) +
|
||||
(CASE WHEN ${t.resourceId} IS NOT NULL THEN 1 ELSE 0 END) +
|
||||
(CASE WHEN ${t.siteResourceId} IS NOT NULL THEN 1 ELSE 0 END)
|
||||
) = 1`
|
||||
),
|
||||
unique("ai_budget_provider_uniq").on(t.providerId),
|
||||
unique("ai_budget_model_uniq").on(t.modelId),
|
||||
unique("ai_budget_resource_uniq").on(t.resourceId),
|
||||
|
||||
Reference in New Issue
Block a user