Merge pull request 'Release 1.0.1' (#5) from dev into main
Reviewed-on: https://git.rhemawavetech.com/NeilClack/Portal.RhemaWaveTech.com/pulls/5
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
-- DropIndex
|
||||
DROP INDEX "Proclamation_content_key";
|
||||
@@ -0,0 +1,8 @@
|
||||
/*
|
||||
Warnings:
|
||||
|
||||
- A unique constraint covering the columns `[key]` on the table `LicenseKey` will be added. If there are existing duplicate values, this will fail.
|
||||
|
||||
*/
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX "LicenseKey_key_key" ON "LicenseKey"("key");
|
||||
@@ -0,0 +1,15 @@
|
||||
-- CreateTable
|
||||
CREATE TABLE "UserProclamations" (
|
||||
"userId" TEXT NOT NULL,
|
||||
"proclamationId" TEXT NOT NULL,
|
||||
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
"updatedAt" TIMESTAMP(3) NOT NULL,
|
||||
|
||||
CONSTRAINT "UserProclamations_pkey" PRIMARY KEY ("userId","proclamationId")
|
||||
);
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "UserProclamations" ADD CONSTRAINT "UserProclamations_userId_fkey" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "UserProclamations" ADD CONSTRAINT "UserProclamations_proclamationId_fkey" FOREIGN KEY ("proclamationId") REFERENCES "Proclamation"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
+27
-14
@@ -14,19 +14,20 @@ datasource db {
|
||||
}
|
||||
|
||||
model User {
|
||||
id String @id
|
||||
name String
|
||||
email String
|
||||
emailVerified Boolean @default(false)
|
||||
image String?
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
roleId Int?
|
||||
role UserRole? @relation(fields: [roleId], references: [id])
|
||||
sessions Session[]
|
||||
accounts Account[]
|
||||
profile Profile?
|
||||
licenseKeys LicenseKey[]
|
||||
id String @id
|
||||
name String
|
||||
email String
|
||||
emailVerified Boolean @default(false)
|
||||
image String?
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
roleId Int?
|
||||
role UserRole? @relation(fields: [roleId], references: [id])
|
||||
sessions Session[]
|
||||
accounts Account[]
|
||||
profile Profile?
|
||||
licenseKeys LicenseKey[]
|
||||
userProclamations UserProclamations[]
|
||||
|
||||
@@unique([email])
|
||||
@@map("user")
|
||||
@@ -118,6 +119,18 @@ model Proclamation {
|
||||
categoryId Int
|
||||
category ProclamationCategory @relation(fields: [categoryId], references: [id])
|
||||
price Float @default(0.99)
|
||||
userProclamations UserProclamations[]
|
||||
}
|
||||
|
||||
model UserProclamations {
|
||||
userId String
|
||||
user User @relation(fields: [userId], references: [id])
|
||||
proclamationId String
|
||||
proclamation Proclamation @relation(fields: [proclamationId], references: [id])
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
|
||||
@@id([userId, proclamationId])
|
||||
}
|
||||
|
||||
model SolfeggioFrequency {
|
||||
@@ -140,7 +153,7 @@ model ProclamationCategory {
|
||||
|
||||
model LicenseKey {
|
||||
id String @id @default(uuid())
|
||||
key String
|
||||
key String @unique
|
||||
active Boolean
|
||||
level String
|
||||
userId String
|
||||
|
||||
@@ -26,6 +26,8 @@
|
||||
submitLabel = 'Save'
|
||||
}: Props = $props();
|
||||
|
||||
$inspect(fields);
|
||||
|
||||
function getValue(field: string): unknown {
|
||||
return form?.[field] ?? record?.[field] ?? '';
|
||||
}
|
||||
@@ -55,11 +57,6 @@
|
||||
placeholder="Select {label}"
|
||||
value={getValue(field) as string | number | undefined}
|
||||
/>
|
||||
{:else if type === 'Tiptap'}
|
||||
<TipTap
|
||||
name={field}
|
||||
initialContent={String(getValue(field) ?? '')}
|
||||
/>
|
||||
{:else if type === 'Boolean'}
|
||||
<input
|
||||
type="checkbox"
|
||||
@@ -79,15 +76,27 @@
|
||||
class="w-full rounded-lg border border-gray-300 px-3 py-2 transition-shadow outline-none focus:border-blue-500 focus:ring-2 focus:ring-blue-500"
|
||||
/>
|
||||
{:else if type === 'Int' || type === 'Float'}
|
||||
<input
|
||||
type="number"
|
||||
id={field}
|
||||
name={field}
|
||||
value={getValue(field) ?? ''}
|
||||
step={type === 'Float' ? '0.01' : '1'}
|
||||
class="w-full rounded-lg border border-gray-300 px-3 py-2 transition-shadow outline-none focus:border-blue-500 focus:ring-2 focus:ring-blue-500"
|
||||
/>
|
||||
{:else}
|
||||
{#if field === 'price'}
|
||||
<input
|
||||
type="number"
|
||||
id={field}
|
||||
name={field}
|
||||
placeholder="0.99"
|
||||
value={getValue(field) ?? '0.99'}
|
||||
step={type === 'Float' ? '0.01' : '1'}
|
||||
class="w-full rounded-lg border border-gray-300 px-3 py-2 transition-shadow outline-none focus:border-blue-500 focus:ring-2 focus:ring-blue-500"
|
||||
/>
|
||||
{:else}
|
||||
<input
|
||||
type="number"
|
||||
id={field}
|
||||
name={field}
|
||||
value={getValue(field) ?? ''}
|
||||
step={type === 'Float' ? '0.01' : '1'}
|
||||
class="w-full rounded-lg border border-gray-300 px-3 py-2 transition-shadow outline-none focus:border-blue-500 focus:ring-2 focus:ring-blue-500"
|
||||
/>
|
||||
{/if}
|
||||
{:else if type === 'String'}
|
||||
<input
|
||||
type="text"
|
||||
id={field}
|
||||
@@ -95,6 +104,8 @@
|
||||
value={getValue(field) ?? ''}
|
||||
class="w-full rounded-lg border border-gray-300 px-3 py-2 transition-shadow outline-none focus:border-blue-500 focus:ring-2 focus:ring-blue-500"
|
||||
/>
|
||||
{:else}
|
||||
<TipTap name={field} initialContent={String(getValue(field) ?? '')} />
|
||||
{/if}
|
||||
</div>
|
||||
{/each}
|
||||
|
||||
@@ -57,6 +57,11 @@ export type Verification = Prisma.VerificationModel
|
||||
*
|
||||
*/
|
||||
export type Proclamation = Prisma.ProclamationModel
|
||||
/**
|
||||
* Model UserProclamations
|
||||
*
|
||||
*/
|
||||
export type UserProclamations = Prisma.UserProclamationsModel
|
||||
/**
|
||||
* Model SolfeggioFrequency
|
||||
*
|
||||
|
||||
@@ -79,6 +79,11 @@ export type Verification = Prisma.VerificationModel
|
||||
*
|
||||
*/
|
||||
export type Proclamation = Prisma.ProclamationModel
|
||||
/**
|
||||
* Model UserProclamations
|
||||
*
|
||||
*/
|
||||
export type UserProclamations = Prisma.UserProclamationsModel
|
||||
/**
|
||||
* Model SolfeggioFrequency
|
||||
*
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -392,6 +392,7 @@ export const ModelName = {
|
||||
UserRole: 'UserRole',
|
||||
Verification: 'Verification',
|
||||
Proclamation: 'Proclamation',
|
||||
UserProclamations: 'UserProclamations',
|
||||
SolfeggioFrequency: 'SolfeggioFrequency',
|
||||
ProclamationCategory: 'ProclamationCategory',
|
||||
LicenseKey: 'LicenseKey'
|
||||
@@ -410,7 +411,7 @@ export type TypeMap<ExtArgs extends runtime.Types.Extensions.InternalArgs = runt
|
||||
omit: GlobalOmitOptions
|
||||
}
|
||||
meta: {
|
||||
modelProps: "user" | "profile" | "address" | "session" | "account" | "userRole" | "verification" | "proclamation" | "solfeggioFrequency" | "proclamationCategory" | "licenseKey"
|
||||
modelProps: "user" | "profile" | "address" | "session" | "account" | "userRole" | "verification" | "proclamation" | "userProclamations" | "solfeggioFrequency" | "proclamationCategory" | "licenseKey"
|
||||
txIsolationLevel: TransactionIsolationLevel
|
||||
}
|
||||
model: {
|
||||
@@ -1006,6 +1007,80 @@ export type TypeMap<ExtArgs extends runtime.Types.Extensions.InternalArgs = runt
|
||||
}
|
||||
}
|
||||
}
|
||||
UserProclamations: {
|
||||
payload: Prisma.$UserProclamationsPayload<ExtArgs>
|
||||
fields: Prisma.UserProclamationsFieldRefs
|
||||
operations: {
|
||||
findUnique: {
|
||||
args: Prisma.UserProclamationsFindUniqueArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$UserProclamationsPayload> | null
|
||||
}
|
||||
findUniqueOrThrow: {
|
||||
args: Prisma.UserProclamationsFindUniqueOrThrowArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$UserProclamationsPayload>
|
||||
}
|
||||
findFirst: {
|
||||
args: Prisma.UserProclamationsFindFirstArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$UserProclamationsPayload> | null
|
||||
}
|
||||
findFirstOrThrow: {
|
||||
args: Prisma.UserProclamationsFindFirstOrThrowArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$UserProclamationsPayload>
|
||||
}
|
||||
findMany: {
|
||||
args: Prisma.UserProclamationsFindManyArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$UserProclamationsPayload>[]
|
||||
}
|
||||
create: {
|
||||
args: Prisma.UserProclamationsCreateArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$UserProclamationsPayload>
|
||||
}
|
||||
createMany: {
|
||||
args: Prisma.UserProclamationsCreateManyArgs<ExtArgs>
|
||||
result: BatchPayload
|
||||
}
|
||||
createManyAndReturn: {
|
||||
args: Prisma.UserProclamationsCreateManyAndReturnArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$UserProclamationsPayload>[]
|
||||
}
|
||||
delete: {
|
||||
args: Prisma.UserProclamationsDeleteArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$UserProclamationsPayload>
|
||||
}
|
||||
update: {
|
||||
args: Prisma.UserProclamationsUpdateArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$UserProclamationsPayload>
|
||||
}
|
||||
deleteMany: {
|
||||
args: Prisma.UserProclamationsDeleteManyArgs<ExtArgs>
|
||||
result: BatchPayload
|
||||
}
|
||||
updateMany: {
|
||||
args: Prisma.UserProclamationsUpdateManyArgs<ExtArgs>
|
||||
result: BatchPayload
|
||||
}
|
||||
updateManyAndReturn: {
|
||||
args: Prisma.UserProclamationsUpdateManyAndReturnArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$UserProclamationsPayload>[]
|
||||
}
|
||||
upsert: {
|
||||
args: Prisma.UserProclamationsUpsertArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$UserProclamationsPayload>
|
||||
}
|
||||
aggregate: {
|
||||
args: Prisma.UserProclamationsAggregateArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.Optional<Prisma.AggregateUserProclamations>
|
||||
}
|
||||
groupBy: {
|
||||
args: Prisma.UserProclamationsGroupByArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.Optional<Prisma.UserProclamationsGroupByOutputType>[]
|
||||
}
|
||||
count: {
|
||||
args: Prisma.UserProclamationsCountArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.Optional<Prisma.UserProclamationsCountAggregateOutputType> | number
|
||||
}
|
||||
}
|
||||
}
|
||||
SolfeggioFrequency: {
|
||||
payload: Prisma.$SolfeggioFrequencyPayload<ExtArgs>
|
||||
fields: Prisma.SolfeggioFrequencyFieldRefs
|
||||
@@ -1370,6 +1445,16 @@ export const ProclamationScalarFieldEnum = {
|
||||
export type ProclamationScalarFieldEnum = (typeof ProclamationScalarFieldEnum)[keyof typeof ProclamationScalarFieldEnum]
|
||||
|
||||
|
||||
export const UserProclamationsScalarFieldEnum = {
|
||||
userId: 'userId',
|
||||
proclamationId: 'proclamationId',
|
||||
createdAt: 'createdAt',
|
||||
updatedAt: 'updatedAt'
|
||||
} as const
|
||||
|
||||
export type UserProclamationsScalarFieldEnum = (typeof UserProclamationsScalarFieldEnum)[keyof typeof UserProclamationsScalarFieldEnum]
|
||||
|
||||
|
||||
export const SolfeggioFrequencyScalarFieldEnum = {
|
||||
id: 'id',
|
||||
name: 'name',
|
||||
@@ -1594,6 +1679,7 @@ export type GlobalOmitConfig = {
|
||||
userRole?: Prisma.UserRoleOmit
|
||||
verification?: Prisma.VerificationOmit
|
||||
proclamation?: Prisma.ProclamationOmit
|
||||
userProclamations?: Prisma.UserProclamationsOmit
|
||||
solfeggioFrequency?: Prisma.SolfeggioFrequencyOmit
|
||||
proclamationCategory?: Prisma.ProclamationCategoryOmit
|
||||
licenseKey?: Prisma.LicenseKeyOmit
|
||||
|
||||
@@ -59,6 +59,7 @@ export const ModelName = {
|
||||
UserRole: 'UserRole',
|
||||
Verification: 'Verification',
|
||||
Proclamation: 'Proclamation',
|
||||
UserProclamations: 'UserProclamations',
|
||||
SolfeggioFrequency: 'SolfeggioFrequency',
|
||||
ProclamationCategory: 'ProclamationCategory',
|
||||
LicenseKey: 'LicenseKey'
|
||||
@@ -183,6 +184,16 @@ export const ProclamationScalarFieldEnum = {
|
||||
export type ProclamationScalarFieldEnum = (typeof ProclamationScalarFieldEnum)[keyof typeof ProclamationScalarFieldEnum]
|
||||
|
||||
|
||||
export const UserProclamationsScalarFieldEnum = {
|
||||
userId: 'userId',
|
||||
proclamationId: 'proclamationId',
|
||||
createdAt: 'createdAt',
|
||||
updatedAt: 'updatedAt'
|
||||
} as const
|
||||
|
||||
export type UserProclamationsScalarFieldEnum = (typeof UserProclamationsScalarFieldEnum)[keyof typeof UserProclamationsScalarFieldEnum]
|
||||
|
||||
|
||||
export const SolfeggioFrequencyScalarFieldEnum = {
|
||||
id: 'id',
|
||||
name: 'name',
|
||||
|
||||
@@ -16,6 +16,7 @@ export type * from './models/Account.ts'
|
||||
export type * from './models/UserRole.ts'
|
||||
export type * from './models/Verification.ts'
|
||||
export type * from './models/Proclamation.ts'
|
||||
export type * from './models/UserProclamations.ts'
|
||||
export type * from './models/SolfeggioFrequency.ts'
|
||||
export type * from './models/ProclamationCategory.ts'
|
||||
export type * from './models/LicenseKey.ts'
|
||||
|
||||
@@ -196,15 +196,15 @@ export type LicenseKeyOrderByWithRelationInput = {
|
||||
|
||||
export type LicenseKeyWhereUniqueInput = Prisma.AtLeast<{
|
||||
id?: string
|
||||
key?: string
|
||||
AND?: Prisma.LicenseKeyWhereInput | Prisma.LicenseKeyWhereInput[]
|
||||
OR?: Prisma.LicenseKeyWhereInput[]
|
||||
NOT?: Prisma.LicenseKeyWhereInput | Prisma.LicenseKeyWhereInput[]
|
||||
key?: Prisma.StringFilter<"LicenseKey"> | string
|
||||
active?: Prisma.BoolFilter<"LicenseKey"> | boolean
|
||||
level?: Prisma.StringFilter<"LicenseKey"> | string
|
||||
userId?: Prisma.StringFilter<"LicenseKey"> | string
|
||||
user?: Prisma.XOR<Prisma.UserScalarRelationFilter, Prisma.UserWhereInput>
|
||||
}, "id">
|
||||
}, "id" | "key">
|
||||
|
||||
export type LicenseKeyOrderByWithAggregationInput = {
|
||||
id?: Prisma.SortOrder
|
||||
|
||||
@@ -234,6 +234,7 @@ export type ProclamationWhereInput = {
|
||||
price?: Prisma.FloatFilter<"Proclamation"> | number
|
||||
solfeggioFrequency?: Prisma.XOR<Prisma.SolfeggioFrequencyScalarRelationFilter, Prisma.SolfeggioFrequencyWhereInput>
|
||||
category?: Prisma.XOR<Prisma.ProclamationCategoryScalarRelationFilter, Prisma.ProclamationCategoryWhereInput>
|
||||
userProclamations?: Prisma.UserProclamationsListRelationFilter
|
||||
}
|
||||
|
||||
export type ProclamationOrderByWithRelationInput = {
|
||||
@@ -245,21 +246,23 @@ export type ProclamationOrderByWithRelationInput = {
|
||||
price?: Prisma.SortOrder
|
||||
solfeggioFrequency?: Prisma.SolfeggioFrequencyOrderByWithRelationInput
|
||||
category?: Prisma.ProclamationCategoryOrderByWithRelationInput
|
||||
userProclamations?: Prisma.UserProclamationsOrderByRelationAggregateInput
|
||||
}
|
||||
|
||||
export type ProclamationWhereUniqueInput = Prisma.AtLeast<{
|
||||
id?: string
|
||||
name?: string
|
||||
content?: string
|
||||
AND?: Prisma.ProclamationWhereInput | Prisma.ProclamationWhereInput[]
|
||||
OR?: Prisma.ProclamationWhereInput[]
|
||||
NOT?: Prisma.ProclamationWhereInput | Prisma.ProclamationWhereInput[]
|
||||
content?: Prisma.StringFilter<"Proclamation"> | string
|
||||
solfeggioFrequencyId?: Prisma.IntFilter<"Proclamation"> | number
|
||||
categoryId?: Prisma.IntFilter<"Proclamation"> | number
|
||||
price?: Prisma.FloatFilter<"Proclamation"> | number
|
||||
solfeggioFrequency?: Prisma.XOR<Prisma.SolfeggioFrequencyScalarRelationFilter, Prisma.SolfeggioFrequencyWhereInput>
|
||||
category?: Prisma.XOR<Prisma.ProclamationCategoryScalarRelationFilter, Prisma.ProclamationCategoryWhereInput>
|
||||
}, "id" | "name" | "content">
|
||||
userProclamations?: Prisma.UserProclamationsListRelationFilter
|
||||
}, "id" | "name">
|
||||
|
||||
export type ProclamationOrderByWithAggregationInput = {
|
||||
id?: Prisma.SortOrder
|
||||
@@ -294,6 +297,7 @@ export type ProclamationCreateInput = {
|
||||
price?: number
|
||||
solfeggioFrequency: Prisma.SolfeggioFrequencyCreateNestedOneWithoutProclamationsInput
|
||||
category: Prisma.ProclamationCategoryCreateNestedOneWithoutProclamationsInput
|
||||
userProclamations?: Prisma.UserProclamationsCreateNestedManyWithoutProclamationInput
|
||||
}
|
||||
|
||||
export type ProclamationUncheckedCreateInput = {
|
||||
@@ -303,6 +307,7 @@ export type ProclamationUncheckedCreateInput = {
|
||||
solfeggioFrequencyId: number
|
||||
categoryId: number
|
||||
price?: number
|
||||
userProclamations?: Prisma.UserProclamationsUncheckedCreateNestedManyWithoutProclamationInput
|
||||
}
|
||||
|
||||
export type ProclamationUpdateInput = {
|
||||
@@ -312,6 +317,7 @@ export type ProclamationUpdateInput = {
|
||||
price?: Prisma.FloatFieldUpdateOperationsInput | number
|
||||
solfeggioFrequency?: Prisma.SolfeggioFrequencyUpdateOneRequiredWithoutProclamationsNestedInput
|
||||
category?: Prisma.ProclamationCategoryUpdateOneRequiredWithoutProclamationsNestedInput
|
||||
userProclamations?: Prisma.UserProclamationsUpdateManyWithoutProclamationNestedInput
|
||||
}
|
||||
|
||||
export type ProclamationUncheckedUpdateInput = {
|
||||
@@ -321,6 +327,7 @@ export type ProclamationUncheckedUpdateInput = {
|
||||
solfeggioFrequencyId?: Prisma.IntFieldUpdateOperationsInput | number
|
||||
categoryId?: Prisma.IntFieldUpdateOperationsInput | number
|
||||
price?: Prisma.FloatFieldUpdateOperationsInput | number
|
||||
userProclamations?: Prisma.UserProclamationsUncheckedUpdateManyWithoutProclamationNestedInput
|
||||
}
|
||||
|
||||
export type ProclamationCreateManyInput = {
|
||||
@@ -387,6 +394,11 @@ export type ProclamationSumOrderByAggregateInput = {
|
||||
price?: Prisma.SortOrder
|
||||
}
|
||||
|
||||
export type ProclamationScalarRelationFilter = {
|
||||
is?: Prisma.ProclamationWhereInput
|
||||
isNot?: Prisma.ProclamationWhereInput
|
||||
}
|
||||
|
||||
export type ProclamationListRelationFilter = {
|
||||
every?: Prisma.ProclamationWhereInput
|
||||
some?: Prisma.ProclamationWhereInput
|
||||
@@ -405,6 +417,20 @@ export type FloatFieldUpdateOperationsInput = {
|
||||
divide?: number
|
||||
}
|
||||
|
||||
export type ProclamationCreateNestedOneWithoutUserProclamationsInput = {
|
||||
create?: Prisma.XOR<Prisma.ProclamationCreateWithoutUserProclamationsInput, Prisma.ProclamationUncheckedCreateWithoutUserProclamationsInput>
|
||||
connectOrCreate?: Prisma.ProclamationCreateOrConnectWithoutUserProclamationsInput
|
||||
connect?: Prisma.ProclamationWhereUniqueInput
|
||||
}
|
||||
|
||||
export type ProclamationUpdateOneRequiredWithoutUserProclamationsNestedInput = {
|
||||
create?: Prisma.XOR<Prisma.ProclamationCreateWithoutUserProclamationsInput, Prisma.ProclamationUncheckedCreateWithoutUserProclamationsInput>
|
||||
connectOrCreate?: Prisma.ProclamationCreateOrConnectWithoutUserProclamationsInput
|
||||
upsert?: Prisma.ProclamationUpsertWithoutUserProclamationsInput
|
||||
connect?: Prisma.ProclamationWhereUniqueInput
|
||||
update?: Prisma.XOR<Prisma.XOR<Prisma.ProclamationUpdateToOneWithWhereWithoutUserProclamationsInput, Prisma.ProclamationUpdateWithoutUserProclamationsInput>, Prisma.ProclamationUncheckedUpdateWithoutUserProclamationsInput>
|
||||
}
|
||||
|
||||
export type ProclamationCreateNestedManyWithoutSolfeggioFrequencyInput = {
|
||||
create?: Prisma.XOR<Prisma.ProclamationCreateWithoutSolfeggioFrequencyInput, Prisma.ProclamationUncheckedCreateWithoutSolfeggioFrequencyInput> | Prisma.ProclamationCreateWithoutSolfeggioFrequencyInput[] | Prisma.ProclamationUncheckedCreateWithoutSolfeggioFrequencyInput[]
|
||||
connectOrCreate?: Prisma.ProclamationCreateOrConnectWithoutSolfeggioFrequencyInput | Prisma.ProclamationCreateOrConnectWithoutSolfeggioFrequencyInput[]
|
||||
@@ -489,12 +515,65 @@ export type ProclamationUncheckedUpdateManyWithoutCategoryNestedInput = {
|
||||
deleteMany?: Prisma.ProclamationScalarWhereInput | Prisma.ProclamationScalarWhereInput[]
|
||||
}
|
||||
|
||||
export type ProclamationCreateWithoutUserProclamationsInput = {
|
||||
id?: string
|
||||
name: string
|
||||
content: string
|
||||
price?: number
|
||||
solfeggioFrequency: Prisma.SolfeggioFrequencyCreateNestedOneWithoutProclamationsInput
|
||||
category: Prisma.ProclamationCategoryCreateNestedOneWithoutProclamationsInput
|
||||
}
|
||||
|
||||
export type ProclamationUncheckedCreateWithoutUserProclamationsInput = {
|
||||
id?: string
|
||||
name: string
|
||||
content: string
|
||||
solfeggioFrequencyId: number
|
||||
categoryId: number
|
||||
price?: number
|
||||
}
|
||||
|
||||
export type ProclamationCreateOrConnectWithoutUserProclamationsInput = {
|
||||
where: Prisma.ProclamationWhereUniqueInput
|
||||
create: Prisma.XOR<Prisma.ProclamationCreateWithoutUserProclamationsInput, Prisma.ProclamationUncheckedCreateWithoutUserProclamationsInput>
|
||||
}
|
||||
|
||||
export type ProclamationUpsertWithoutUserProclamationsInput = {
|
||||
update: Prisma.XOR<Prisma.ProclamationUpdateWithoutUserProclamationsInput, Prisma.ProclamationUncheckedUpdateWithoutUserProclamationsInput>
|
||||
create: Prisma.XOR<Prisma.ProclamationCreateWithoutUserProclamationsInput, Prisma.ProclamationUncheckedCreateWithoutUserProclamationsInput>
|
||||
where?: Prisma.ProclamationWhereInput
|
||||
}
|
||||
|
||||
export type ProclamationUpdateToOneWithWhereWithoutUserProclamationsInput = {
|
||||
where?: Prisma.ProclamationWhereInput
|
||||
data: Prisma.XOR<Prisma.ProclamationUpdateWithoutUserProclamationsInput, Prisma.ProclamationUncheckedUpdateWithoutUserProclamationsInput>
|
||||
}
|
||||
|
||||
export type ProclamationUpdateWithoutUserProclamationsInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
content?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
price?: Prisma.FloatFieldUpdateOperationsInput | number
|
||||
solfeggioFrequency?: Prisma.SolfeggioFrequencyUpdateOneRequiredWithoutProclamationsNestedInput
|
||||
category?: Prisma.ProclamationCategoryUpdateOneRequiredWithoutProclamationsNestedInput
|
||||
}
|
||||
|
||||
export type ProclamationUncheckedUpdateWithoutUserProclamationsInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
content?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
solfeggioFrequencyId?: Prisma.IntFieldUpdateOperationsInput | number
|
||||
categoryId?: Prisma.IntFieldUpdateOperationsInput | number
|
||||
price?: Prisma.FloatFieldUpdateOperationsInput | number
|
||||
}
|
||||
|
||||
export type ProclamationCreateWithoutSolfeggioFrequencyInput = {
|
||||
id?: string
|
||||
name: string
|
||||
content: string
|
||||
price?: number
|
||||
category: Prisma.ProclamationCategoryCreateNestedOneWithoutProclamationsInput
|
||||
userProclamations?: Prisma.UserProclamationsCreateNestedManyWithoutProclamationInput
|
||||
}
|
||||
|
||||
export type ProclamationUncheckedCreateWithoutSolfeggioFrequencyInput = {
|
||||
@@ -503,6 +582,7 @@ export type ProclamationUncheckedCreateWithoutSolfeggioFrequencyInput = {
|
||||
content: string
|
||||
categoryId: number
|
||||
price?: number
|
||||
userProclamations?: Prisma.UserProclamationsUncheckedCreateNestedManyWithoutProclamationInput
|
||||
}
|
||||
|
||||
export type ProclamationCreateOrConnectWithoutSolfeggioFrequencyInput = {
|
||||
@@ -549,6 +629,7 @@ export type ProclamationCreateWithoutCategoryInput = {
|
||||
content: string
|
||||
price?: number
|
||||
solfeggioFrequency: Prisma.SolfeggioFrequencyCreateNestedOneWithoutProclamationsInput
|
||||
userProclamations?: Prisma.UserProclamationsCreateNestedManyWithoutProclamationInput
|
||||
}
|
||||
|
||||
export type ProclamationUncheckedCreateWithoutCategoryInput = {
|
||||
@@ -557,6 +638,7 @@ export type ProclamationUncheckedCreateWithoutCategoryInput = {
|
||||
content: string
|
||||
solfeggioFrequencyId: number
|
||||
price?: number
|
||||
userProclamations?: Prisma.UserProclamationsUncheckedCreateNestedManyWithoutProclamationInput
|
||||
}
|
||||
|
||||
export type ProclamationCreateOrConnectWithoutCategoryInput = {
|
||||
@@ -599,6 +681,7 @@ export type ProclamationUpdateWithoutSolfeggioFrequencyInput = {
|
||||
content?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
price?: Prisma.FloatFieldUpdateOperationsInput | number
|
||||
category?: Prisma.ProclamationCategoryUpdateOneRequiredWithoutProclamationsNestedInput
|
||||
userProclamations?: Prisma.UserProclamationsUpdateManyWithoutProclamationNestedInput
|
||||
}
|
||||
|
||||
export type ProclamationUncheckedUpdateWithoutSolfeggioFrequencyInput = {
|
||||
@@ -607,6 +690,7 @@ export type ProclamationUncheckedUpdateWithoutSolfeggioFrequencyInput = {
|
||||
content?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
categoryId?: Prisma.IntFieldUpdateOperationsInput | number
|
||||
price?: Prisma.FloatFieldUpdateOperationsInput | number
|
||||
userProclamations?: Prisma.UserProclamationsUncheckedUpdateManyWithoutProclamationNestedInput
|
||||
}
|
||||
|
||||
export type ProclamationUncheckedUpdateManyWithoutSolfeggioFrequencyInput = {
|
||||
@@ -631,6 +715,7 @@ export type ProclamationUpdateWithoutCategoryInput = {
|
||||
content?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
price?: Prisma.FloatFieldUpdateOperationsInput | number
|
||||
solfeggioFrequency?: Prisma.SolfeggioFrequencyUpdateOneRequiredWithoutProclamationsNestedInput
|
||||
userProclamations?: Prisma.UserProclamationsUpdateManyWithoutProclamationNestedInput
|
||||
}
|
||||
|
||||
export type ProclamationUncheckedUpdateWithoutCategoryInput = {
|
||||
@@ -639,6 +724,7 @@ export type ProclamationUncheckedUpdateWithoutCategoryInput = {
|
||||
content?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
solfeggioFrequencyId?: Prisma.IntFieldUpdateOperationsInput | number
|
||||
price?: Prisma.FloatFieldUpdateOperationsInput | number
|
||||
userProclamations?: Prisma.UserProclamationsUncheckedUpdateManyWithoutProclamationNestedInput
|
||||
}
|
||||
|
||||
export type ProclamationUncheckedUpdateManyWithoutCategoryInput = {
|
||||
@@ -650,6 +736,35 @@ export type ProclamationUncheckedUpdateManyWithoutCategoryInput = {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Count Type ProclamationCountOutputType
|
||||
*/
|
||||
|
||||
export type ProclamationCountOutputType = {
|
||||
userProclamations: number
|
||||
}
|
||||
|
||||
export type ProclamationCountOutputTypeSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
userProclamations?: boolean | ProclamationCountOutputTypeCountUserProclamationsArgs
|
||||
}
|
||||
|
||||
/**
|
||||
* ProclamationCountOutputType without action
|
||||
*/
|
||||
export type ProclamationCountOutputTypeDefaultArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
/**
|
||||
* Select specific fields to fetch from the ProclamationCountOutputType
|
||||
*/
|
||||
select?: Prisma.ProclamationCountOutputTypeSelect<ExtArgs> | null
|
||||
}
|
||||
|
||||
/**
|
||||
* ProclamationCountOutputType without action
|
||||
*/
|
||||
export type ProclamationCountOutputTypeCountUserProclamationsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
where?: Prisma.UserProclamationsWhereInput
|
||||
}
|
||||
|
||||
|
||||
export type ProclamationSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
|
||||
id?: boolean
|
||||
@@ -660,6 +775,8 @@ export type ProclamationSelect<ExtArgs extends runtime.Types.Extensions.Internal
|
||||
price?: boolean
|
||||
solfeggioFrequency?: boolean | Prisma.SolfeggioFrequencyDefaultArgs<ExtArgs>
|
||||
category?: boolean | Prisma.ProclamationCategoryDefaultArgs<ExtArgs>
|
||||
userProclamations?: boolean | Prisma.Proclamation$userProclamationsArgs<ExtArgs>
|
||||
_count?: boolean | Prisma.ProclamationCountOutputTypeDefaultArgs<ExtArgs>
|
||||
}, ExtArgs["result"]["proclamation"]>
|
||||
|
||||
export type ProclamationSelectCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
|
||||
@@ -697,6 +814,8 @@ export type ProclamationOmit<ExtArgs extends runtime.Types.Extensions.InternalAr
|
||||
export type ProclamationInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
solfeggioFrequency?: boolean | Prisma.SolfeggioFrequencyDefaultArgs<ExtArgs>
|
||||
category?: boolean | Prisma.ProclamationCategoryDefaultArgs<ExtArgs>
|
||||
userProclamations?: boolean | Prisma.Proclamation$userProclamationsArgs<ExtArgs>
|
||||
_count?: boolean | Prisma.ProclamationCountOutputTypeDefaultArgs<ExtArgs>
|
||||
}
|
||||
export type ProclamationIncludeCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
solfeggioFrequency?: boolean | Prisma.SolfeggioFrequencyDefaultArgs<ExtArgs>
|
||||
@@ -712,6 +831,7 @@ export type $ProclamationPayload<ExtArgs extends runtime.Types.Extensions.Intern
|
||||
objects: {
|
||||
solfeggioFrequency: Prisma.$SolfeggioFrequencyPayload<ExtArgs>
|
||||
category: Prisma.$ProclamationCategoryPayload<ExtArgs>
|
||||
userProclamations: Prisma.$UserProclamationsPayload<ExtArgs>[]
|
||||
}
|
||||
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
||||
id: string
|
||||
@@ -1116,6 +1236,7 @@ export interface Prisma__ProclamationClient<T, Null = never, ExtArgs extends run
|
||||
readonly [Symbol.toStringTag]: "PrismaPromise"
|
||||
solfeggioFrequency<T extends Prisma.SolfeggioFrequencyDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.SolfeggioFrequencyDefaultArgs<ExtArgs>>): Prisma.Prisma__SolfeggioFrequencyClient<runtime.Types.Result.GetResult<Prisma.$SolfeggioFrequencyPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
|
||||
category<T extends Prisma.ProclamationCategoryDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.ProclamationCategoryDefaultArgs<ExtArgs>>): Prisma.Prisma__ProclamationCategoryClient<runtime.Types.Result.GetResult<Prisma.$ProclamationCategoryPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
|
||||
userProclamations<T extends Prisma.Proclamation$userProclamationsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Proclamation$userProclamationsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$UserProclamationsPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||
/**
|
||||
* Attaches callbacks for the resolution and/or rejection of the Promise.
|
||||
* @param onfulfilled The callback to execute when the Promise is resolved.
|
||||
@@ -1546,6 +1667,30 @@ export type ProclamationDeleteManyArgs<ExtArgs extends runtime.Types.Extensions.
|
||||
limit?: number
|
||||
}
|
||||
|
||||
/**
|
||||
* Proclamation.userProclamations
|
||||
*/
|
||||
export type Proclamation$userProclamationsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
/**
|
||||
* Select specific fields to fetch from the UserProclamations
|
||||
*/
|
||||
select?: Prisma.UserProclamationsSelect<ExtArgs> | null
|
||||
/**
|
||||
* Omit specific fields from the UserProclamations
|
||||
*/
|
||||
omit?: Prisma.UserProclamationsOmit<ExtArgs> | null
|
||||
/**
|
||||
* Choose, which related nodes to fetch as well
|
||||
*/
|
||||
include?: Prisma.UserProclamationsInclude<ExtArgs> | null
|
||||
where?: Prisma.UserProclamationsWhereInput
|
||||
orderBy?: Prisma.UserProclamationsOrderByWithRelationInput | Prisma.UserProclamationsOrderByWithRelationInput[]
|
||||
cursor?: Prisma.UserProclamationsWhereUniqueInput
|
||||
take?: number
|
||||
skip?: number
|
||||
distinct?: Prisma.UserProclamationsScalarFieldEnum | Prisma.UserProclamationsScalarFieldEnum[]
|
||||
}
|
||||
|
||||
/**
|
||||
* Proclamation without action
|
||||
*/
|
||||
|
||||
@@ -220,15 +220,16 @@ export type ProclamationCategoryOrderByWithRelationInput = {
|
||||
|
||||
export type ProclamationCategoryWhereUniqueInput = Prisma.AtLeast<{
|
||||
id?: number
|
||||
name?: string
|
||||
parentId_name?: Prisma.ProclamationCategoryParentIdNameCompoundUniqueInput
|
||||
AND?: Prisma.ProclamationCategoryWhereInput | Prisma.ProclamationCategoryWhereInput[]
|
||||
OR?: Prisma.ProclamationCategoryWhereInput[]
|
||||
NOT?: Prisma.ProclamationCategoryWhereInput | Prisma.ProclamationCategoryWhereInput[]
|
||||
name?: Prisma.StringFilter<"ProclamationCategory"> | string
|
||||
parentId?: Prisma.IntNullableFilter<"ProclamationCategory"> | number | null
|
||||
parent?: Prisma.XOR<Prisma.ProclamationCategoryNullableScalarRelationFilter, Prisma.ProclamationCategoryWhereInput> | null
|
||||
children?: Prisma.ProclamationCategoryListRelationFilter
|
||||
proclamations?: Prisma.ProclamationListRelationFilter
|
||||
}, "id" | "name">
|
||||
}, "id" | "parentId_name">
|
||||
|
||||
export type ProclamationCategoryOrderByWithAggregationInput = {
|
||||
id?: Prisma.SortOrder
|
||||
@@ -316,6 +317,11 @@ export type ProclamationCategoryOrderByRelationAggregateInput = {
|
||||
_count?: Prisma.SortOrder
|
||||
}
|
||||
|
||||
export type ProclamationCategoryParentIdNameCompoundUniqueInput = {
|
||||
parentId: number
|
||||
name: string
|
||||
}
|
||||
|
||||
export type ProclamationCategoryCountOrderByAggregateInput = {
|
||||
id?: Prisma.SortOrder
|
||||
name?: Prisma.SortOrder
|
||||
|
||||
@@ -245,6 +245,7 @@ export type UserWhereInput = {
|
||||
accounts?: Prisma.AccountListRelationFilter
|
||||
profile?: Prisma.XOR<Prisma.ProfileNullableScalarRelationFilter, Prisma.ProfileWhereInput> | null
|
||||
licenseKeys?: Prisma.LicenseKeyListRelationFilter
|
||||
userProclamations?: Prisma.UserProclamationsListRelationFilter
|
||||
}
|
||||
|
||||
export type UserOrderByWithRelationInput = {
|
||||
@@ -261,6 +262,7 @@ export type UserOrderByWithRelationInput = {
|
||||
accounts?: Prisma.AccountOrderByRelationAggregateInput
|
||||
profile?: Prisma.ProfileOrderByWithRelationInput
|
||||
licenseKeys?: Prisma.LicenseKeyOrderByRelationAggregateInput
|
||||
userProclamations?: Prisma.UserProclamationsOrderByRelationAggregateInput
|
||||
}
|
||||
|
||||
export type UserWhereUniqueInput = Prisma.AtLeast<{
|
||||
@@ -280,6 +282,7 @@ export type UserWhereUniqueInput = Prisma.AtLeast<{
|
||||
accounts?: Prisma.AccountListRelationFilter
|
||||
profile?: Prisma.XOR<Prisma.ProfileNullableScalarRelationFilter, Prisma.ProfileWhereInput> | null
|
||||
licenseKeys?: Prisma.LicenseKeyListRelationFilter
|
||||
userProclamations?: Prisma.UserProclamationsListRelationFilter
|
||||
}, "id" | "email">
|
||||
|
||||
export type UserOrderByWithAggregationInput = {
|
||||
@@ -325,6 +328,7 @@ export type UserCreateInput = {
|
||||
accounts?: Prisma.AccountCreateNestedManyWithoutUserInput
|
||||
profile?: Prisma.ProfileCreateNestedOneWithoutUserInput
|
||||
licenseKeys?: Prisma.LicenseKeyCreateNestedManyWithoutUserInput
|
||||
userProclamations?: Prisma.UserProclamationsCreateNestedManyWithoutUserInput
|
||||
}
|
||||
|
||||
export type UserUncheckedCreateInput = {
|
||||
@@ -340,6 +344,7 @@ export type UserUncheckedCreateInput = {
|
||||
accounts?: Prisma.AccountUncheckedCreateNestedManyWithoutUserInput
|
||||
profile?: Prisma.ProfileUncheckedCreateNestedOneWithoutUserInput
|
||||
licenseKeys?: Prisma.LicenseKeyUncheckedCreateNestedManyWithoutUserInput
|
||||
userProclamations?: Prisma.UserProclamationsUncheckedCreateNestedManyWithoutUserInput
|
||||
}
|
||||
|
||||
export type UserUpdateInput = {
|
||||
@@ -355,6 +360,7 @@ export type UserUpdateInput = {
|
||||
accounts?: Prisma.AccountUpdateManyWithoutUserNestedInput
|
||||
profile?: Prisma.ProfileUpdateOneWithoutUserNestedInput
|
||||
licenseKeys?: Prisma.LicenseKeyUpdateManyWithoutUserNestedInput
|
||||
userProclamations?: Prisma.UserProclamationsUpdateManyWithoutUserNestedInput
|
||||
}
|
||||
|
||||
export type UserUncheckedUpdateInput = {
|
||||
@@ -370,6 +376,7 @@ export type UserUncheckedUpdateInput = {
|
||||
accounts?: Prisma.AccountUncheckedUpdateManyWithoutUserNestedInput
|
||||
profile?: Prisma.ProfileUncheckedUpdateOneWithoutUserNestedInput
|
||||
licenseKeys?: Prisma.LicenseKeyUncheckedUpdateManyWithoutUserNestedInput
|
||||
userProclamations?: Prisma.UserProclamationsUncheckedUpdateManyWithoutUserNestedInput
|
||||
}
|
||||
|
||||
export type UserCreateManyInput = {
|
||||
@@ -568,6 +575,20 @@ export type UserUncheckedUpdateManyWithoutRoleNestedInput = {
|
||||
deleteMany?: Prisma.UserScalarWhereInput | Prisma.UserScalarWhereInput[]
|
||||
}
|
||||
|
||||
export type UserCreateNestedOneWithoutUserProclamationsInput = {
|
||||
create?: Prisma.XOR<Prisma.UserCreateWithoutUserProclamationsInput, Prisma.UserUncheckedCreateWithoutUserProclamationsInput>
|
||||
connectOrCreate?: Prisma.UserCreateOrConnectWithoutUserProclamationsInput
|
||||
connect?: Prisma.UserWhereUniqueInput
|
||||
}
|
||||
|
||||
export type UserUpdateOneRequiredWithoutUserProclamationsNestedInput = {
|
||||
create?: Prisma.XOR<Prisma.UserCreateWithoutUserProclamationsInput, Prisma.UserUncheckedCreateWithoutUserProclamationsInput>
|
||||
connectOrCreate?: Prisma.UserCreateOrConnectWithoutUserProclamationsInput
|
||||
upsert?: Prisma.UserUpsertWithoutUserProclamationsInput
|
||||
connect?: Prisma.UserWhereUniqueInput
|
||||
update?: Prisma.XOR<Prisma.XOR<Prisma.UserUpdateToOneWithWhereWithoutUserProclamationsInput, Prisma.UserUpdateWithoutUserProclamationsInput>, Prisma.UserUncheckedUpdateWithoutUserProclamationsInput>
|
||||
}
|
||||
|
||||
export type UserCreateNestedOneWithoutLicenseKeysInput = {
|
||||
create?: Prisma.XOR<Prisma.UserCreateWithoutLicenseKeysInput, Prisma.UserUncheckedCreateWithoutLicenseKeysInput>
|
||||
connectOrCreate?: Prisma.UserCreateOrConnectWithoutLicenseKeysInput
|
||||
@@ -594,6 +615,7 @@ export type UserCreateWithoutProfileInput = {
|
||||
sessions?: Prisma.SessionCreateNestedManyWithoutUserInput
|
||||
accounts?: Prisma.AccountCreateNestedManyWithoutUserInput
|
||||
licenseKeys?: Prisma.LicenseKeyCreateNestedManyWithoutUserInput
|
||||
userProclamations?: Prisma.UserProclamationsCreateNestedManyWithoutUserInput
|
||||
}
|
||||
|
||||
export type UserUncheckedCreateWithoutProfileInput = {
|
||||
@@ -608,6 +630,7 @@ export type UserUncheckedCreateWithoutProfileInput = {
|
||||
sessions?: Prisma.SessionUncheckedCreateNestedManyWithoutUserInput
|
||||
accounts?: Prisma.AccountUncheckedCreateNestedManyWithoutUserInput
|
||||
licenseKeys?: Prisma.LicenseKeyUncheckedCreateNestedManyWithoutUserInput
|
||||
userProclamations?: Prisma.UserProclamationsUncheckedCreateNestedManyWithoutUserInput
|
||||
}
|
||||
|
||||
export type UserCreateOrConnectWithoutProfileInput = {
|
||||
@@ -638,6 +661,7 @@ export type UserUpdateWithoutProfileInput = {
|
||||
sessions?: Prisma.SessionUpdateManyWithoutUserNestedInput
|
||||
accounts?: Prisma.AccountUpdateManyWithoutUserNestedInput
|
||||
licenseKeys?: Prisma.LicenseKeyUpdateManyWithoutUserNestedInput
|
||||
userProclamations?: Prisma.UserProclamationsUpdateManyWithoutUserNestedInput
|
||||
}
|
||||
|
||||
export type UserUncheckedUpdateWithoutProfileInput = {
|
||||
@@ -652,6 +676,7 @@ export type UserUncheckedUpdateWithoutProfileInput = {
|
||||
sessions?: Prisma.SessionUncheckedUpdateManyWithoutUserNestedInput
|
||||
accounts?: Prisma.AccountUncheckedUpdateManyWithoutUserNestedInput
|
||||
licenseKeys?: Prisma.LicenseKeyUncheckedUpdateManyWithoutUserNestedInput
|
||||
userProclamations?: Prisma.UserProclamationsUncheckedUpdateManyWithoutUserNestedInput
|
||||
}
|
||||
|
||||
export type UserCreateWithoutSessionsInput = {
|
||||
@@ -666,6 +691,7 @@ export type UserCreateWithoutSessionsInput = {
|
||||
accounts?: Prisma.AccountCreateNestedManyWithoutUserInput
|
||||
profile?: Prisma.ProfileCreateNestedOneWithoutUserInput
|
||||
licenseKeys?: Prisma.LicenseKeyCreateNestedManyWithoutUserInput
|
||||
userProclamations?: Prisma.UserProclamationsCreateNestedManyWithoutUserInput
|
||||
}
|
||||
|
||||
export type UserUncheckedCreateWithoutSessionsInput = {
|
||||
@@ -680,6 +706,7 @@ export type UserUncheckedCreateWithoutSessionsInput = {
|
||||
accounts?: Prisma.AccountUncheckedCreateNestedManyWithoutUserInput
|
||||
profile?: Prisma.ProfileUncheckedCreateNestedOneWithoutUserInput
|
||||
licenseKeys?: Prisma.LicenseKeyUncheckedCreateNestedManyWithoutUserInput
|
||||
userProclamations?: Prisma.UserProclamationsUncheckedCreateNestedManyWithoutUserInput
|
||||
}
|
||||
|
||||
export type UserCreateOrConnectWithoutSessionsInput = {
|
||||
@@ -710,6 +737,7 @@ export type UserUpdateWithoutSessionsInput = {
|
||||
accounts?: Prisma.AccountUpdateManyWithoutUserNestedInput
|
||||
profile?: Prisma.ProfileUpdateOneWithoutUserNestedInput
|
||||
licenseKeys?: Prisma.LicenseKeyUpdateManyWithoutUserNestedInput
|
||||
userProclamations?: Prisma.UserProclamationsUpdateManyWithoutUserNestedInput
|
||||
}
|
||||
|
||||
export type UserUncheckedUpdateWithoutSessionsInput = {
|
||||
@@ -724,6 +752,7 @@ export type UserUncheckedUpdateWithoutSessionsInput = {
|
||||
accounts?: Prisma.AccountUncheckedUpdateManyWithoutUserNestedInput
|
||||
profile?: Prisma.ProfileUncheckedUpdateOneWithoutUserNestedInput
|
||||
licenseKeys?: Prisma.LicenseKeyUncheckedUpdateManyWithoutUserNestedInput
|
||||
userProclamations?: Prisma.UserProclamationsUncheckedUpdateManyWithoutUserNestedInput
|
||||
}
|
||||
|
||||
export type UserCreateWithoutAccountsInput = {
|
||||
@@ -738,6 +767,7 @@ export type UserCreateWithoutAccountsInput = {
|
||||
sessions?: Prisma.SessionCreateNestedManyWithoutUserInput
|
||||
profile?: Prisma.ProfileCreateNestedOneWithoutUserInput
|
||||
licenseKeys?: Prisma.LicenseKeyCreateNestedManyWithoutUserInput
|
||||
userProclamations?: Prisma.UserProclamationsCreateNestedManyWithoutUserInput
|
||||
}
|
||||
|
||||
export type UserUncheckedCreateWithoutAccountsInput = {
|
||||
@@ -752,6 +782,7 @@ export type UserUncheckedCreateWithoutAccountsInput = {
|
||||
sessions?: Prisma.SessionUncheckedCreateNestedManyWithoutUserInput
|
||||
profile?: Prisma.ProfileUncheckedCreateNestedOneWithoutUserInput
|
||||
licenseKeys?: Prisma.LicenseKeyUncheckedCreateNestedManyWithoutUserInput
|
||||
userProclamations?: Prisma.UserProclamationsUncheckedCreateNestedManyWithoutUserInput
|
||||
}
|
||||
|
||||
export type UserCreateOrConnectWithoutAccountsInput = {
|
||||
@@ -782,6 +813,7 @@ export type UserUpdateWithoutAccountsInput = {
|
||||
sessions?: Prisma.SessionUpdateManyWithoutUserNestedInput
|
||||
profile?: Prisma.ProfileUpdateOneWithoutUserNestedInput
|
||||
licenseKeys?: Prisma.LicenseKeyUpdateManyWithoutUserNestedInput
|
||||
userProclamations?: Prisma.UserProclamationsUpdateManyWithoutUserNestedInput
|
||||
}
|
||||
|
||||
export type UserUncheckedUpdateWithoutAccountsInput = {
|
||||
@@ -796,6 +828,7 @@ export type UserUncheckedUpdateWithoutAccountsInput = {
|
||||
sessions?: Prisma.SessionUncheckedUpdateManyWithoutUserNestedInput
|
||||
profile?: Prisma.ProfileUncheckedUpdateOneWithoutUserNestedInput
|
||||
licenseKeys?: Prisma.LicenseKeyUncheckedUpdateManyWithoutUserNestedInput
|
||||
userProclamations?: Prisma.UserProclamationsUncheckedUpdateManyWithoutUserNestedInput
|
||||
}
|
||||
|
||||
export type UserCreateWithoutRoleInput = {
|
||||
@@ -810,6 +843,7 @@ export type UserCreateWithoutRoleInput = {
|
||||
accounts?: Prisma.AccountCreateNestedManyWithoutUserInput
|
||||
profile?: Prisma.ProfileCreateNestedOneWithoutUserInput
|
||||
licenseKeys?: Prisma.LicenseKeyCreateNestedManyWithoutUserInput
|
||||
userProclamations?: Prisma.UserProclamationsCreateNestedManyWithoutUserInput
|
||||
}
|
||||
|
||||
export type UserUncheckedCreateWithoutRoleInput = {
|
||||
@@ -824,6 +858,7 @@ export type UserUncheckedCreateWithoutRoleInput = {
|
||||
accounts?: Prisma.AccountUncheckedCreateNestedManyWithoutUserInput
|
||||
profile?: Prisma.ProfileUncheckedCreateNestedOneWithoutUserInput
|
||||
licenseKeys?: Prisma.LicenseKeyUncheckedCreateNestedManyWithoutUserInput
|
||||
userProclamations?: Prisma.UserProclamationsUncheckedCreateNestedManyWithoutUserInput
|
||||
}
|
||||
|
||||
export type UserCreateOrConnectWithoutRoleInput = {
|
||||
@@ -866,6 +901,82 @@ export type UserScalarWhereInput = {
|
||||
roleId?: Prisma.IntNullableFilter<"User"> | number | null
|
||||
}
|
||||
|
||||
export type UserCreateWithoutUserProclamationsInput = {
|
||||
id: string
|
||||
name: string
|
||||
email: string
|
||||
emailVerified?: boolean
|
||||
image?: string | null
|
||||
createdAt?: Date | string
|
||||
updatedAt?: Date | string
|
||||
role?: Prisma.UserRoleCreateNestedOneWithoutUsersInput
|
||||
sessions?: Prisma.SessionCreateNestedManyWithoutUserInput
|
||||
accounts?: Prisma.AccountCreateNestedManyWithoutUserInput
|
||||
profile?: Prisma.ProfileCreateNestedOneWithoutUserInput
|
||||
licenseKeys?: Prisma.LicenseKeyCreateNestedManyWithoutUserInput
|
||||
}
|
||||
|
||||
export type UserUncheckedCreateWithoutUserProclamationsInput = {
|
||||
id: string
|
||||
name: string
|
||||
email: string
|
||||
emailVerified?: boolean
|
||||
image?: string | null
|
||||
createdAt?: Date | string
|
||||
updatedAt?: Date | string
|
||||
roleId?: number | null
|
||||
sessions?: Prisma.SessionUncheckedCreateNestedManyWithoutUserInput
|
||||
accounts?: Prisma.AccountUncheckedCreateNestedManyWithoutUserInput
|
||||
profile?: Prisma.ProfileUncheckedCreateNestedOneWithoutUserInput
|
||||
licenseKeys?: Prisma.LicenseKeyUncheckedCreateNestedManyWithoutUserInput
|
||||
}
|
||||
|
||||
export type UserCreateOrConnectWithoutUserProclamationsInput = {
|
||||
where: Prisma.UserWhereUniqueInput
|
||||
create: Prisma.XOR<Prisma.UserCreateWithoutUserProclamationsInput, Prisma.UserUncheckedCreateWithoutUserProclamationsInput>
|
||||
}
|
||||
|
||||
export type UserUpsertWithoutUserProclamationsInput = {
|
||||
update: Prisma.XOR<Prisma.UserUpdateWithoutUserProclamationsInput, Prisma.UserUncheckedUpdateWithoutUserProclamationsInput>
|
||||
create: Prisma.XOR<Prisma.UserCreateWithoutUserProclamationsInput, Prisma.UserUncheckedCreateWithoutUserProclamationsInput>
|
||||
where?: Prisma.UserWhereInput
|
||||
}
|
||||
|
||||
export type UserUpdateToOneWithWhereWithoutUserProclamationsInput = {
|
||||
where?: Prisma.UserWhereInput
|
||||
data: Prisma.XOR<Prisma.UserUpdateWithoutUserProclamationsInput, Prisma.UserUncheckedUpdateWithoutUserProclamationsInput>
|
||||
}
|
||||
|
||||
export type UserUpdateWithoutUserProclamationsInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
email?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
emailVerified?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
image?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
role?: Prisma.UserRoleUpdateOneWithoutUsersNestedInput
|
||||
sessions?: Prisma.SessionUpdateManyWithoutUserNestedInput
|
||||
accounts?: Prisma.AccountUpdateManyWithoutUserNestedInput
|
||||
profile?: Prisma.ProfileUpdateOneWithoutUserNestedInput
|
||||
licenseKeys?: Prisma.LicenseKeyUpdateManyWithoutUserNestedInput
|
||||
}
|
||||
|
||||
export type UserUncheckedUpdateWithoutUserProclamationsInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
email?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
emailVerified?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
image?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
roleId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
||||
sessions?: Prisma.SessionUncheckedUpdateManyWithoutUserNestedInput
|
||||
accounts?: Prisma.AccountUncheckedUpdateManyWithoutUserNestedInput
|
||||
profile?: Prisma.ProfileUncheckedUpdateOneWithoutUserNestedInput
|
||||
licenseKeys?: Prisma.LicenseKeyUncheckedUpdateManyWithoutUserNestedInput
|
||||
}
|
||||
|
||||
export type UserCreateWithoutLicenseKeysInput = {
|
||||
id: string
|
||||
name: string
|
||||
@@ -878,6 +989,7 @@ export type UserCreateWithoutLicenseKeysInput = {
|
||||
sessions?: Prisma.SessionCreateNestedManyWithoutUserInput
|
||||
accounts?: Prisma.AccountCreateNestedManyWithoutUserInput
|
||||
profile?: Prisma.ProfileCreateNestedOneWithoutUserInput
|
||||
userProclamations?: Prisma.UserProclamationsCreateNestedManyWithoutUserInput
|
||||
}
|
||||
|
||||
export type UserUncheckedCreateWithoutLicenseKeysInput = {
|
||||
@@ -892,6 +1004,7 @@ export type UserUncheckedCreateWithoutLicenseKeysInput = {
|
||||
sessions?: Prisma.SessionUncheckedCreateNestedManyWithoutUserInput
|
||||
accounts?: Prisma.AccountUncheckedCreateNestedManyWithoutUserInput
|
||||
profile?: Prisma.ProfileUncheckedCreateNestedOneWithoutUserInput
|
||||
userProclamations?: Prisma.UserProclamationsUncheckedCreateNestedManyWithoutUserInput
|
||||
}
|
||||
|
||||
export type UserCreateOrConnectWithoutLicenseKeysInput = {
|
||||
@@ -922,6 +1035,7 @@ export type UserUpdateWithoutLicenseKeysInput = {
|
||||
sessions?: Prisma.SessionUpdateManyWithoutUserNestedInput
|
||||
accounts?: Prisma.AccountUpdateManyWithoutUserNestedInput
|
||||
profile?: Prisma.ProfileUpdateOneWithoutUserNestedInput
|
||||
userProclamations?: Prisma.UserProclamationsUpdateManyWithoutUserNestedInput
|
||||
}
|
||||
|
||||
export type UserUncheckedUpdateWithoutLicenseKeysInput = {
|
||||
@@ -936,6 +1050,7 @@ export type UserUncheckedUpdateWithoutLicenseKeysInput = {
|
||||
sessions?: Prisma.SessionUncheckedUpdateManyWithoutUserNestedInput
|
||||
accounts?: Prisma.AccountUncheckedUpdateManyWithoutUserNestedInput
|
||||
profile?: Prisma.ProfileUncheckedUpdateOneWithoutUserNestedInput
|
||||
userProclamations?: Prisma.UserProclamationsUncheckedUpdateManyWithoutUserNestedInput
|
||||
}
|
||||
|
||||
export type UserCreateManyRoleInput = {
|
||||
@@ -960,6 +1075,7 @@ export type UserUpdateWithoutRoleInput = {
|
||||
accounts?: Prisma.AccountUpdateManyWithoutUserNestedInput
|
||||
profile?: Prisma.ProfileUpdateOneWithoutUserNestedInput
|
||||
licenseKeys?: Prisma.LicenseKeyUpdateManyWithoutUserNestedInput
|
||||
userProclamations?: Prisma.UserProclamationsUpdateManyWithoutUserNestedInput
|
||||
}
|
||||
|
||||
export type UserUncheckedUpdateWithoutRoleInput = {
|
||||
@@ -974,6 +1090,7 @@ export type UserUncheckedUpdateWithoutRoleInput = {
|
||||
accounts?: Prisma.AccountUncheckedUpdateManyWithoutUserNestedInput
|
||||
profile?: Prisma.ProfileUncheckedUpdateOneWithoutUserNestedInput
|
||||
licenseKeys?: Prisma.LicenseKeyUncheckedUpdateManyWithoutUserNestedInput
|
||||
userProclamations?: Prisma.UserProclamationsUncheckedUpdateManyWithoutUserNestedInput
|
||||
}
|
||||
|
||||
export type UserUncheckedUpdateManyWithoutRoleInput = {
|
||||
@@ -995,12 +1112,14 @@ export type UserCountOutputType = {
|
||||
sessions: number
|
||||
accounts: number
|
||||
licenseKeys: number
|
||||
userProclamations: number
|
||||
}
|
||||
|
||||
export type UserCountOutputTypeSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
sessions?: boolean | UserCountOutputTypeCountSessionsArgs
|
||||
accounts?: boolean | UserCountOutputTypeCountAccountsArgs
|
||||
licenseKeys?: boolean | UserCountOutputTypeCountLicenseKeysArgs
|
||||
userProclamations?: boolean | UserCountOutputTypeCountUserProclamationsArgs
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1034,6 +1153,13 @@ export type UserCountOutputTypeCountLicenseKeysArgs<ExtArgs extends runtime.Type
|
||||
where?: Prisma.LicenseKeyWhereInput
|
||||
}
|
||||
|
||||
/**
|
||||
* UserCountOutputType without action
|
||||
*/
|
||||
export type UserCountOutputTypeCountUserProclamationsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
where?: Prisma.UserProclamationsWhereInput
|
||||
}
|
||||
|
||||
|
||||
export type UserSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
|
||||
id?: boolean
|
||||
@@ -1049,6 +1175,7 @@ export type UserSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = r
|
||||
accounts?: boolean | Prisma.User$accountsArgs<ExtArgs>
|
||||
profile?: boolean | Prisma.User$profileArgs<ExtArgs>
|
||||
licenseKeys?: boolean | Prisma.User$licenseKeysArgs<ExtArgs>
|
||||
userProclamations?: boolean | Prisma.User$userProclamationsArgs<ExtArgs>
|
||||
_count?: boolean | Prisma.UserCountOutputTypeDefaultArgs<ExtArgs>
|
||||
}, ExtArgs["result"]["user"]>
|
||||
|
||||
@@ -1094,6 +1221,7 @@ export type UserInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs =
|
||||
accounts?: boolean | Prisma.User$accountsArgs<ExtArgs>
|
||||
profile?: boolean | Prisma.User$profileArgs<ExtArgs>
|
||||
licenseKeys?: boolean | Prisma.User$licenseKeysArgs<ExtArgs>
|
||||
userProclamations?: boolean | Prisma.User$userProclamationsArgs<ExtArgs>
|
||||
_count?: boolean | Prisma.UserCountOutputTypeDefaultArgs<ExtArgs>
|
||||
}
|
||||
export type UserIncludeCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
@@ -1111,6 +1239,7 @@ export type $UserPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs =
|
||||
accounts: Prisma.$AccountPayload<ExtArgs>[]
|
||||
profile: Prisma.$ProfilePayload<ExtArgs> | null
|
||||
licenseKeys: Prisma.$LicenseKeyPayload<ExtArgs>[]
|
||||
userProclamations: Prisma.$UserProclamationsPayload<ExtArgs>[]
|
||||
}
|
||||
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
||||
id: string
|
||||
@@ -1520,6 +1649,7 @@ export interface Prisma__UserClient<T, Null = never, ExtArgs extends runtime.Typ
|
||||
accounts<T extends Prisma.User$accountsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.User$accountsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$AccountPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||
profile<T extends Prisma.User$profileArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.User$profileArgs<ExtArgs>>): Prisma.Prisma__ProfileClient<runtime.Types.Result.GetResult<Prisma.$ProfilePayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
|
||||
licenseKeys<T extends Prisma.User$licenseKeysArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.User$licenseKeysArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$LicenseKeyPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||
userProclamations<T extends Prisma.User$userProclamationsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.User$userProclamationsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$UserProclamationsPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||
/**
|
||||
* Attaches callbacks for the resolution and/or rejection of the Promise.
|
||||
* @param onfulfilled The callback to execute when the Promise is resolved.
|
||||
@@ -2062,6 +2192,30 @@ export type User$licenseKeysArgs<ExtArgs extends runtime.Types.Extensions.Intern
|
||||
distinct?: Prisma.LicenseKeyScalarFieldEnum | Prisma.LicenseKeyScalarFieldEnum[]
|
||||
}
|
||||
|
||||
/**
|
||||
* User.userProclamations
|
||||
*/
|
||||
export type User$userProclamationsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
/**
|
||||
* Select specific fields to fetch from the UserProclamations
|
||||
*/
|
||||
select?: Prisma.UserProclamationsSelect<ExtArgs> | null
|
||||
/**
|
||||
* Omit specific fields from the UserProclamations
|
||||
*/
|
||||
omit?: Prisma.UserProclamationsOmit<ExtArgs> | null
|
||||
/**
|
||||
* Choose, which related nodes to fetch as well
|
||||
*/
|
||||
include?: Prisma.UserProclamationsInclude<ExtArgs> | null
|
||||
where?: Prisma.UserProclamationsWhereInput
|
||||
orderBy?: Prisma.UserProclamationsOrderByWithRelationInput | Prisma.UserProclamationsOrderByWithRelationInput[]
|
||||
cursor?: Prisma.UserProclamationsWhereUniqueInput
|
||||
take?: number
|
||||
skip?: number
|
||||
distinct?: Prisma.UserProclamationsScalarFieldEnum | Prisma.UserProclamationsScalarFieldEnum[]
|
||||
}
|
||||
|
||||
/**
|
||||
* User without action
|
||||
*/
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -83,23 +83,23 @@ No new route files, no new components. The registry is the only thing you touch.
|
||||
|
||||
### AdminModelConfig
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
|---|---|---|---|
|
||||
| `slug` | `string` | Yes | URL segment (kebab-case). Used in `/admin/{slug}`. |
|
||||
| `modelName` | `string` | Yes | Prisma model name (PascalCase, **singular**). Maps to `prisma[lcfirst(modelName)]`. |
|
||||
| `displayName` | `string` | Yes | Plural display name for headings and navigation. |
|
||||
| `displayNameSingular` | `string` | Yes | Singular name for edit page headings. |
|
||||
| `idType` | `'String' \| 'Int'` | Yes | Primary key type. Controls how the `id` URL param is parsed. |
|
||||
| `include` | `Record<string, boolean \| { include: ... }>` | No | Prisma `include` clause for eager-loading relations. |
|
||||
| `listFields` | `string[]` | Yes | Table columns. Supports dot-notation for relations (e.g., `'role.name'`). |
|
||||
| `searchFields` | `string[]` | Yes | Fields searched by the client-side search filter. |
|
||||
| `formFields` | `string[]` | Yes | Fields rendered in create/edit forms, in display order. |
|
||||
| `readonlyFields` | `string[]` | No | Fields shown as read-only on the edit page. |
|
||||
| `listOnly` | `boolean` | No | If `true`, suppresses edit links in the table. |
|
||||
| `fieldTypes` | `Record<string, PrismaScalarType>` | Yes | Maps field names to scalar types. Controls input rendering and FormData parsing. |
|
||||
| `relationOptions` | `Record<string, RelationOptionConfig>` | No | FK fields that render as ComboBox dropdowns. |
|
||||
| `relatedRecords` | `RelatedRecordConfig[]` | No | Has-one/has-many panels shown on edit pages. |
|
||||
| `accessFilter` | `(viewerRoleId: number) => where \| undefined` | No | Returns a Prisma `where` clause to filter records by viewer role. `undefined` = no filter. |
|
||||
| Field | Type | Required | Description |
|
||||
| --------------------- | ---------------------------------------------- | -------- | ------------------------------------------------------------------------------------------ |
|
||||
| `slug` | `string` | Yes | URL segment (kebab-case). Used in `/admin/{slug}`. |
|
||||
| `modelName` | `string` | Yes | Prisma model name (PascalCase, **singular**). Maps to `prisma[lcfirst(modelName)]`. |
|
||||
| `displayName` | `string` | Yes | Plural display name for headings and navigation. |
|
||||
| `displayNameSingular` | `string` | Yes | Singular name for edit page headings. |
|
||||
| `idType` | `'String' \| 'Int'` | Yes | Primary key type. Controls how the `id` URL param is parsed. |
|
||||
| `include` | `Record<string, boolean \| { include: ... }>` | No | Prisma `include` clause for eager-loading relations. |
|
||||
| `listFields` | `string[]` | Yes | Table columns. Supports dot-notation for relations (e.g., `'role.name'`). |
|
||||
| `searchFields` | `string[]` | Yes | Fields searched by the client-side search filter. |
|
||||
| `formFields` | `string[]` | Yes | Fields rendered in create/edit forms, in display order. |
|
||||
| `readonlyFields` | `string[]` | No | Fields shown as read-only on the edit page. |
|
||||
| `listOnly` | `boolean` | No | If `true`, suppresses edit links in the table. |
|
||||
| `fieldTypes` | `Record<string, PrismaScalarType>` | Yes | Maps field names to scalar types. Controls input rendering and FormData parsing. |
|
||||
| `relationOptions` | `Record<string, RelationOptionConfig>` | No | FK fields that render as ComboBox dropdowns. |
|
||||
| `relatedRecords` | `RelatedRecordConfig[]` | No | Has-one/has-many panels shown on edit pages. |
|
||||
| `accessFilter` | `(viewerRoleId: number) => where \| undefined` | No | Returns a Prisma `where` clause to filter records by viewer role. `undefined` = no filter. |
|
||||
|
||||
### PrismaScalarType
|
||||
|
||||
@@ -107,13 +107,13 @@ No new route files, no new components. The registry is the only thing you touch.
|
||||
|
||||
Controls both form input rendering and FormData parsing:
|
||||
|
||||
| Type | HTML Input | Parse Logic |
|
||||
|---|---|---|
|
||||
| `String` | `<input type="text">` | `raw.toString()` |
|
||||
| `Int` | `<input type="number" step="1">` | `parseInt()`, empty → `null` |
|
||||
| `Float` | `<input type="number" step="0.01">` | `parseFloat()`, empty → `null` |
|
||||
| `Boolean` | `<input type="checkbox">` | `'on'` or `'true'` → `true` |
|
||||
| `DateTime` | `<input type="datetime-local">` | `new Date()`, empty → `null` |
|
||||
| Type | HTML Input | Parse Logic |
|
||||
| ---------- | ----------------------------------- | ------------------------------ |
|
||||
| `String` | `<input type="text">` | `raw.toString()` |
|
||||
| `Int` | `<input type="number" step="1">` | `parseInt()`, empty → `null` |
|
||||
| `Float` | `<input type="number" step="0.01">` | `parseFloat()`, empty → `null` |
|
||||
| `Boolean` | `<input type="checkbox">` | `'on'` or `'true'` → `true` |
|
||||
| `DateTime` | `<input type="datetime-local">` | `new Date()`, empty → `null` |
|
||||
|
||||
### RelationOptionConfig
|
||||
|
||||
@@ -184,20 +184,20 @@ Display has-one or has-many related records as panels on the edit page using `re
|
||||
|
||||
```ts
|
||||
relatedRecords: [
|
||||
{
|
||||
relationKey: 'profile',
|
||||
label: 'Profile',
|
||||
type: 'has-one',
|
||||
displayFields: ['firstName', 'lastName'],
|
||||
editSlug: 'profiles' // links to /admin/profiles/{id}
|
||||
},
|
||||
{
|
||||
relationKey: 'licenseKeys',
|
||||
label: 'License Keys',
|
||||
type: 'has-many',
|
||||
displayFields: ['key', 'active', 'level']
|
||||
}
|
||||
]
|
||||
{
|
||||
relationKey: 'profile',
|
||||
label: 'Profile',
|
||||
type: 'has-one',
|
||||
displayFields: ['firstName', 'lastName'],
|
||||
editSlug: 'profiles' // links to /admin/profiles/{id}
|
||||
},
|
||||
{
|
||||
relationKey: 'licenseKeys',
|
||||
label: 'License Keys',
|
||||
type: 'has-many',
|
||||
displayFields: ['key', 'active', 'level']
|
||||
}
|
||||
];
|
||||
```
|
||||
|
||||
The `relationKey` must match a key in `include` so the data is actually loaded. `has-one` renders
|
||||
@@ -210,12 +210,12 @@ support an optional `editSlug` to link to the related record's edit page.
|
||||
|
||||
Defined in `roles.ts`. Lower numbers = higher privilege:
|
||||
|
||||
| Constant | Value | Access Level |
|
||||
|---|---|---|
|
||||
| `ROLES.SUPER` | 1 | Full access, sees all users |
|
||||
| `ROLES.ADMIN` | 2 | Admin access, sees staff and below |
|
||||
| `ROLES.STAFF` | 3 | Staff access (minimum for admin panel) |
|
||||
| `ROLES.USER` | 4 | Regular user (no admin access) |
|
||||
| Constant | Value | Access Level |
|
||||
| ------------- | ----- | -------------------------------------- |
|
||||
| `ROLES.SUPER` | 1 | Full access, sees all users |
|
||||
| `ROLES.ADMIN` | 2 | Admin access, sees staff and below |
|
||||
| `ROLES.STAFF` | 3 | Staff access (minimum for admin panel) |
|
||||
| `ROLES.USER` | 4 | Regular user (no admin access) |
|
||||
|
||||
### Layout Guard
|
||||
|
||||
@@ -228,12 +228,12 @@ Use `accessFilter` to restrict which records a viewer can see:
|
||||
|
||||
```ts
|
||||
accessFilter: (viewerRoleId: number) => {
|
||||
if (viewerRoleId <= ROLES.SUPER) return undefined; // no filter
|
||||
if (viewerRoleId <= ROLES.ADMIN) {
|
||||
return { roleId: { gte: ROLES.STAFF } }; // can't see other admins
|
||||
}
|
||||
return { roleId: { gt: ROLES.STAFF } }; // staff sees only regular users
|
||||
}
|
||||
if (viewerRoleId <= ROLES.SUPER) return undefined; // no filter
|
||||
if (viewerRoleId <= ROLES.ADMIN) {
|
||||
return { roleId: { gte: ROLES.STAFF } }; // can't see other admins
|
||||
}
|
||||
return { roleId: { gt: ROLES.STAFF } }; // staff sees only regular users
|
||||
};
|
||||
```
|
||||
|
||||
## How Dynamic Routing Works
|
||||
@@ -250,74 +250,74 @@ accessFilter: (viewerRoleId: number) => {
|
||||
|
||||
### AdminTable
|
||||
|
||||
| Prop | Type | Description |
|
||||
|---|---|---|
|
||||
| `records` | `Record<string, unknown>[]` | Data rows |
|
||||
| `listFields` | `string[]` | Column keys (dot-notation supported) |
|
||||
| `searchFields` | `string[]` | Fields for client-side search |
|
||||
| `modelSlug` | `string` | Used for building edit links |
|
||||
| `listOnly` | `boolean?` | Suppress edit links |
|
||||
| Prop | Type | Description |
|
||||
| -------------- | --------------------------- | ------------------------------------ |
|
||||
| `records` | `Record<string, unknown>[]` | Data rows |
|
||||
| `listFields` | `string[]` | Column keys (dot-notation supported) |
|
||||
| `searchFields` | `string[]` | Fields for client-side search |
|
||||
| `modelSlug` | `string` | Used for building edit links |
|
||||
| `listOnly` | `boolean?` | Suppress edit links |
|
||||
|
||||
Features: client-side search, click-to-sort columns, auto-formatted cells (dates, booleans,
|
||||
decimals), filtered count display.
|
||||
|
||||
### AdminForm
|
||||
|
||||
| Prop | Type | Description |
|
||||
|---|---|---|
|
||||
| `fields` | `string[]` | Field names to render |
|
||||
| `fieldTypes` | `Record<string, PrismaScalarType>` | Type mapping for inputs |
|
||||
| `relationOptions` | `Record<string, RelationOptionConfig>?` | FK dropdown configs |
|
||||
| `relationOptionsData` | `Record<string, { label; value }[]>?` | Loaded dropdown options |
|
||||
| `record` | `Record<string, unknown>?` | Pre-fill values (edit mode) |
|
||||
| `form` | `ActionData?` | Carries validation errors |
|
||||
| `action` | `string` | Form action (e.g., `'?/create'`) |
|
||||
| `submitLabel` | `string?` | Button text |
|
||||
| Prop | Type | Description |
|
||||
| --------------------- | --------------------------------------- | -------------------------------- |
|
||||
| `fields` | `string[]` | Field names to render |
|
||||
| `fieldTypes` | `Record<string, PrismaScalarType>` | Type mapping for inputs |
|
||||
| `relationOptions` | `Record<string, RelationOptionConfig>?` | FK dropdown configs |
|
||||
| `relationOptionsData` | `Record<string, { label; value }[]>?` | Loaded dropdown options |
|
||||
| `record` | `Record<string, unknown>?` | Pre-fill values (edit mode) |
|
||||
| `form` | `ActionData?` | Carries validation errors |
|
||||
| `action` | `string` | Form action (e.g., `'?/create'`) |
|
||||
| `submitLabel` | `string?` | Button text |
|
||||
|
||||
### ComboBox
|
||||
|
||||
| Prop | Type | Description |
|
||||
|---|---|---|
|
||||
| `id` | `string` | Element ID |
|
||||
| `name` | `string` | Form field name |
|
||||
| `options` | `{ label; value }[]` | Dropdown items |
|
||||
| `placeholder` | `string?` | Placeholder text |
|
||||
| `value` | `string \| number?` | Pre-selected value |
|
||||
| Prop | Type | Description |
|
||||
| ------------- | -------------------- | ------------------ |
|
||||
| `id` | `string` | Element ID |
|
||||
| `name` | `string` | Form field name |
|
||||
| `options` | `{ label; value }[]` | Dropdown items |
|
||||
| `placeholder` | `string?` | Placeholder text |
|
||||
| `value` | `string \| number?` | Pre-selected value |
|
||||
|
||||
Features: type-to-search filtering, keyboard navigation (ArrowUp/Down, Enter, Escape),
|
||||
clear button, scroll-to-highlight.
|
||||
|
||||
### RelatedHasOne
|
||||
|
||||
| Prop | Type | Description |
|
||||
|---|---|---|
|
||||
| `label` | `string` | Section heading |
|
||||
| `record` | `Record<string, unknown> \| null` | Related record |
|
||||
| `displayFields` | `string[]` | Fields to display as key-value pairs |
|
||||
| `editSlug` | `string?` | Links to edit the related record |
|
||||
| Prop | Type | Description |
|
||||
| --------------- | --------------------------------- | ------------------------------------ |
|
||||
| `label` | `string` | Section heading |
|
||||
| `record` | `Record<string, unknown> \| null` | Related record |
|
||||
| `displayFields` | `string[]` | Fields to display as key-value pairs |
|
||||
| `editSlug` | `string?` | Links to edit the related record |
|
||||
|
||||
### RelatedHasMany
|
||||
|
||||
| Prop | Type | Description |
|
||||
|---|---|---|
|
||||
| `label` | `string` | Section heading (shows count) |
|
||||
| `records` | `Record<string, unknown>[]` | Related records |
|
||||
| `displayFields` | `string[]` | Table columns |
|
||||
| `editSlug` | `string?` | Per-row edit links |
|
||||
| Prop | Type | Description |
|
||||
| --------------- | --------------------------- | ----------------------------- |
|
||||
| `label` | `string` | Section heading (shows count) |
|
||||
| `records` | `Record<string, unknown>[]` | Related records |
|
||||
| `displayFields` | `string[]` | Table columns |
|
||||
| `editSlug` | `string?` | Per-row edit links |
|
||||
|
||||
## Utility Functions
|
||||
|
||||
| Function | Module | Description |
|
||||
|---|---|---|
|
||||
| `fieldNameToLabel(name)` | `introspect.ts` | `'solfeggioFrequencyId'` → `'Solfeggio Frequency'` (strips `Id`, adds spaces) |
|
||||
| `resolveFieldValue(record, path)` | `introspect.ts` | Resolves dot-notation paths like `'category.name'` on nested objects |
|
||||
| `extractFormData(formData, fields, types)` | `form-data.ts` | Parses `FormData` with type-aware conversion per `PrismaScalarType` |
|
||||
| `getDelegate(config)` | `prisma-delegate.ts` | Returns `prisma[lcfirst(modelName)]` delegate |
|
||||
| `parseId(config, raw)` | `prisma-delegate.ts` | Parses string to `number` when `idType` is `'Int'` |
|
||||
| `getModelConfig(slug)` | `registry.ts` | Looks up config by URL slug |
|
||||
| `getAllModelConfigs()` | `registry.ts` | Returns all registered model configs |
|
||||
| `hasRole(roleId, required)` | `roles.ts` | `true` if `roleId <= required` |
|
||||
| `canAccessAdmin(roleId)` | `roles.ts` | `true` if `roleId <= ROLES.STAFF` |
|
||||
| Function | Module | Description |
|
||||
| ------------------------------------------ | -------------------- | ----------------------------------------------------------------------------- |
|
||||
| `fieldNameToLabel(name)` | `introspect.ts` | `'solfeggioFrequencyId'` → `'Solfeggio Frequency'` (strips `Id`, adds spaces) |
|
||||
| `resolveFieldValue(record, path)` | `introspect.ts` | Resolves dot-notation paths like `'category.name'` on nested objects |
|
||||
| `extractFormData(formData, fields, types)` | `form-data.ts` | Parses `FormData` with type-aware conversion per `PrismaScalarType` |
|
||||
| `getDelegate(config)` | `prisma-delegate.ts` | Returns `prisma[lcfirst(modelName)]` delegate |
|
||||
| `parseId(config, raw)` | `prisma-delegate.ts` | Parses string to `number` when `idType` is `'Int'` |
|
||||
| `getModelConfig(slug)` | `registry.ts` | Looks up config by URL slug |
|
||||
| `getAllModelConfigs()` | `registry.ts` | Returns all registered model configs |
|
||||
| `hasRole(roleId, required)` | `roles.ts` | `true` if `roleId <= required` |
|
||||
| `canAccessAdmin(roleId)` | `roles.ts` | `true` if `roleId <= ROLES.STAFF` |
|
||||
|
||||
## Complete Example
|
||||
|
||||
|
||||
@@ -99,7 +99,7 @@ const models: AdminModelConfig[] = [
|
||||
include: { solfeggioFrequency: true, category: { include: { parent: true } } },
|
||||
listFields: ['name', 'category.displayName', 'solfeggioFrequency.name', 'price'],
|
||||
searchFields: ['name', 'content'],
|
||||
formFields: ['name', 'content', 'solfeggioFrequencyId', 'categoryId', 'price'],
|
||||
formFields: ['name', 'solfeggioFrequencyId', 'categoryId', 'price', 'content'],
|
||||
readonlyFields: ['id'],
|
||||
fieldTypes: {
|
||||
name: 'String',
|
||||
|
||||
@@ -2,6 +2,11 @@ import { error } from '@sveltejs/kit';
|
||||
import type { RequestHandler } from './$types';
|
||||
import { prisma } from '$lib/db';
|
||||
|
||||
// /api/v1/proclamations
|
||||
// GET only
|
||||
// ?email, ?key (license key)
|
||||
// Returns all proclamations without email and key, else returns proclamations
|
||||
// associated with the user associated with the key and email
|
||||
export const GET: RequestHandler = async ({ url }) => {
|
||||
const key = url.searchParams.get('key') ?? '';
|
||||
const email = url.searchParams.get('email') ?? '';
|
||||
@@ -20,11 +25,38 @@ export const GET: RequestHandler = async ({ url }) => {
|
||||
}
|
||||
|
||||
// Check that the key exists
|
||||
// Check that the email exists
|
||||
// Check that the email belongs to a user
|
||||
// Check that the key belongs to the user
|
||||
// Write a helper function for this
|
||||
// Return all proclamations attached to the user
|
||||
const verifiedKey = await prisma.licenseKey.findUnique({
|
||||
where: {
|
||||
key: key
|
||||
}
|
||||
});
|
||||
if (!verifiedKey) {
|
||||
return error(400, 'not-authorized');
|
||||
}
|
||||
|
||||
return new Response(JSON.stringify({ error: 'not implemented' }), { status: 501 });
|
||||
// Check that the email exists
|
||||
const existingUser = await prisma.user.findUnique({
|
||||
where: {
|
||||
email: email
|
||||
},
|
||||
include: {
|
||||
licenseKeys: true
|
||||
}
|
||||
});
|
||||
if (!existingUser) {
|
||||
return error(400, 'not-authorized');
|
||||
}
|
||||
// Check that the key belongs to the user
|
||||
if (!existingUser.licenseKeys.includes(verifiedKey)) {
|
||||
return error(400, "this key doesn't appear to belong to you");
|
||||
}
|
||||
|
||||
// Return all proclamations attached to the user
|
||||
const userProclamations = await prisma.userProclamations.findMany({
|
||||
where: {
|
||||
userId: existingUser.id
|
||||
}
|
||||
});
|
||||
|
||||
return new Response(JSON.stringify(userProclamations));
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user