Adds deployment settings to DB (#6706)
This commit is contained in:
parent
1cf83068b2
commit
a63f9ddf61
|
@ -0,0 +1,10 @@
|
|||
-- CreateTable
|
||||
CREATE TABLE "Deployment" (
|
||||
"id" INTEGER NOT NULL DEFAULT 1,
|
||||
"logo" TEXT,
|
||||
"theme" JSONB,
|
||||
"licenseKey" TEXT,
|
||||
"agreedLicenseAt" TIMESTAMP(3),
|
||||
|
||||
CONSTRAINT "Deployment_pkey" PRIMARY KEY ("id")
|
||||
);
|
|
@ -8,7 +8,7 @@ datasource db {
|
|||
|
||||
generator client {
|
||||
provider = "prisma-client-js"
|
||||
previewFeatures = ["interactiveTransactions"]
|
||||
previewFeatures = ["clientExtensions"]
|
||||
}
|
||||
|
||||
generator zod {
|
||||
|
@ -615,6 +615,16 @@ model WorkflowsOnEventTypes {
|
|||
eventTypeId Int
|
||||
}
|
||||
|
||||
model Deployment {
|
||||
/// This is a single row table, so we use a fixed id
|
||||
id Int @id @default(1)
|
||||
logo String?
|
||||
/// @zod.custom(imports.DeploymentTheme)
|
||||
theme Json?
|
||||
licenseKey String?
|
||||
agreedLicenseAt DateTime?
|
||||
}
|
||||
|
||||
enum TimeUnit {
|
||||
DAY @map("day")
|
||||
HOUR @map("hour")
|
||||
|
|
|
@ -293,6 +293,24 @@ export const RoutingFormSettings = z
|
|||
})
|
||||
.nullable();
|
||||
|
||||
export const DeploymentTheme = z
|
||||
.object({
|
||||
brand: z.string().default("#292929"),
|
||||
textBrand: z.string().default("#ffffff"),
|
||||
darkBrand: z.string().default("#fafafa"),
|
||||
textDarkBrand: z.string().default("#292929"),
|
||||
bookingHighlight: z.string().default("#10B981"),
|
||||
bookingLightest: z.string().default("#E1E1E1"),
|
||||
bookingLighter: z.string().default("#ACACAC"),
|
||||
bookingLight: z.string().default("#888888"),
|
||||
bookingMedian: z.string().default("#494949"),
|
||||
bookingDark: z.string().default("#313131"),
|
||||
bookingDarker: z.string().default("#292929"),
|
||||
fontName: z.string().default("Cal Sans"),
|
||||
fontSrc: z.string().default("https://cal.com/cal.ttf"),
|
||||
})
|
||||
.optional();
|
||||
|
||||
export type ZodDenullish<T extends ZodTypeAny> = T extends ZodNullable<infer U> | ZodOptional<infer U>
|
||||
? ZodDenullish<U>
|
||||
: T;
|
||||
|
|
Loading…
Reference in New Issue
Block a user