Add sub-categories to affirmation categories

Add self-referential parent/child relation on AffirmationCategory for
   one-level hierarchy. Update AffirmationForm with two-level category and
   sub-category dropdowns, server actions with find-or-create hierarchy
   logic, AffirmationList with Parent
This commit is contained in:
NeilClack
2026-02-23 10:53:15 -06:00
parent a230a1e36d
commit 3c201f9b66
14 changed files with 573 additions and 64 deletions
File diff suppressed because one or more lines are too long
@@ -1381,7 +1381,8 @@ export type SolfeggioFrequencyScalarFieldEnum = (typeof SolfeggioFrequencyScalar
export const AffirmationCategoryScalarFieldEnum = {
id: 'id',
name: 'name'
name: 'name',
parentId: 'parentId'
} as const
export type AffirmationCategoryScalarFieldEnum = (typeof AffirmationCategoryScalarFieldEnum)[keyof typeof AffirmationCategoryScalarFieldEnum]
@@ -194,7 +194,8 @@ export type SolfeggioFrequencyScalarFieldEnum = (typeof SolfeggioFrequencyScalar
export const AffirmationCategoryScalarFieldEnum = {
id: 'id',
name: 'name'
name: 'name',
parentId: 'parentId'
} as const
export type AffirmationCategoryScalarFieldEnum = (typeof AffirmationCategoryScalarFieldEnum)[keyof typeof AffirmationCategoryScalarFieldEnum]
@@ -28,50 +28,60 @@ export type AggregateAffirmationCategory = {
export type AffirmationCategoryAvgAggregateOutputType = {
id: number | null
parentId: number | null
}
export type AffirmationCategorySumAggregateOutputType = {
id: number | null
parentId: number | null
}
export type AffirmationCategoryMinAggregateOutputType = {
id: number | null
name: string | null
parentId: number | null
}
export type AffirmationCategoryMaxAggregateOutputType = {
id: number | null
name: string | null
parentId: number | null
}
export type AffirmationCategoryCountAggregateOutputType = {
id: number
name: number
parentId: number
_all: number
}
export type AffirmationCategoryAvgAggregateInputType = {
id?: true
parentId?: true
}
export type AffirmationCategorySumAggregateInputType = {
id?: true
parentId?: true
}
export type AffirmationCategoryMinAggregateInputType = {
id?: true
name?: true
parentId?: true
}
export type AffirmationCategoryMaxAggregateInputType = {
id?: true
name?: true
parentId?: true
}
export type AffirmationCategoryCountAggregateInputType = {
id?: true
name?: true
parentId?: true
_all?: true
}
@@ -164,6 +174,7 @@ export type AffirmationCategoryGroupByArgs<ExtArgs extends runtime.Types.Extensi
export type AffirmationCategoryGroupByOutputType = {
id: number
name: string
parentId: number | null
_count: AffirmationCategoryCountAggregateOutputType | null
_avg: AffirmationCategoryAvgAggregateOutputType | null
_sum: AffirmationCategorySumAggregateOutputType | null
@@ -192,12 +203,18 @@ export type AffirmationCategoryWhereInput = {
NOT?: Prisma.AffirmationCategoryWhereInput | Prisma.AffirmationCategoryWhereInput[]
id?: Prisma.IntFilter<"AffirmationCategory"> | number
name?: Prisma.StringFilter<"AffirmationCategory"> | string
parentId?: Prisma.IntNullableFilter<"AffirmationCategory"> | number | null
parent?: Prisma.XOR<Prisma.AffirmationCategoryNullableScalarRelationFilter, Prisma.AffirmationCategoryWhereInput> | null
children?: Prisma.AffirmationCategoryListRelationFilter
affirmations?: Prisma.AffirmationListRelationFilter
}
export type AffirmationCategoryOrderByWithRelationInput = {
id?: Prisma.SortOrder
name?: Prisma.SortOrder
parentId?: Prisma.SortOrderInput | Prisma.SortOrder
parent?: Prisma.AffirmationCategoryOrderByWithRelationInput
children?: Prisma.AffirmationCategoryOrderByRelationAggregateInput
affirmations?: Prisma.AffirmationOrderByRelationAggregateInput
}
@@ -207,12 +224,16 @@ export type AffirmationCategoryWhereUniqueInput = Prisma.AtLeast<{
AND?: Prisma.AffirmationCategoryWhereInput | Prisma.AffirmationCategoryWhereInput[]
OR?: Prisma.AffirmationCategoryWhereInput[]
NOT?: Prisma.AffirmationCategoryWhereInput | Prisma.AffirmationCategoryWhereInput[]
parentId?: Prisma.IntNullableFilter<"AffirmationCategory"> | number | null
parent?: Prisma.XOR<Prisma.AffirmationCategoryNullableScalarRelationFilter, Prisma.AffirmationCategoryWhereInput> | null
children?: Prisma.AffirmationCategoryListRelationFilter
affirmations?: Prisma.AffirmationListRelationFilter
}, "id" | "name">
export type AffirmationCategoryOrderByWithAggregationInput = {
id?: Prisma.SortOrder
name?: Prisma.SortOrder
parentId?: Prisma.SortOrderInput | Prisma.SortOrder
_count?: Prisma.AffirmationCategoryCountOrderByAggregateInput
_avg?: Prisma.AffirmationCategoryAvgOrderByAggregateInput
_max?: Prisma.AffirmationCategoryMaxOrderByAggregateInput
@@ -226,33 +247,43 @@ export type AffirmationCategoryScalarWhereWithAggregatesInput = {
NOT?: Prisma.AffirmationCategoryScalarWhereWithAggregatesInput | Prisma.AffirmationCategoryScalarWhereWithAggregatesInput[]
id?: Prisma.IntWithAggregatesFilter<"AffirmationCategory"> | number
name?: Prisma.StringWithAggregatesFilter<"AffirmationCategory"> | string
parentId?: Prisma.IntNullableWithAggregatesFilter<"AffirmationCategory"> | number | null
}
export type AffirmationCategoryCreateInput = {
name: string
parent?: Prisma.AffirmationCategoryCreateNestedOneWithoutChildrenInput
children?: Prisma.AffirmationCategoryCreateNestedManyWithoutParentInput
affirmations?: Prisma.AffirmationCreateNestedManyWithoutCategoryInput
}
export type AffirmationCategoryUncheckedCreateInput = {
id?: number
name: string
parentId?: number | null
children?: Prisma.AffirmationCategoryUncheckedCreateNestedManyWithoutParentInput
affirmations?: Prisma.AffirmationUncheckedCreateNestedManyWithoutCategoryInput
}
export type AffirmationCategoryUpdateInput = {
name?: Prisma.StringFieldUpdateOperationsInput | string
parent?: Prisma.AffirmationCategoryUpdateOneWithoutChildrenNestedInput
children?: Prisma.AffirmationCategoryUpdateManyWithoutParentNestedInput
affirmations?: Prisma.AffirmationUpdateManyWithoutCategoryNestedInput
}
export type AffirmationCategoryUncheckedUpdateInput = {
id?: Prisma.IntFieldUpdateOperationsInput | number
name?: Prisma.StringFieldUpdateOperationsInput | string
parentId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
children?: Prisma.AffirmationCategoryUncheckedUpdateManyWithoutParentNestedInput
affirmations?: Prisma.AffirmationUncheckedUpdateManyWithoutCategoryNestedInput
}
export type AffirmationCategoryCreateManyInput = {
id?: number
name: string
parentId?: number | null
}
export type AffirmationCategoryUpdateManyMutationInput = {
@@ -262,6 +293,7 @@ export type AffirmationCategoryUpdateManyMutationInput = {
export type AffirmationCategoryUncheckedUpdateManyInput = {
id?: Prisma.IntFieldUpdateOperationsInput | number
name?: Prisma.StringFieldUpdateOperationsInput | string
parentId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
}
export type AffirmationCategoryScalarRelationFilter = {
@@ -269,27 +301,47 @@ export type AffirmationCategoryScalarRelationFilter = {
isNot?: Prisma.AffirmationCategoryWhereInput
}
export type AffirmationCategoryNullableScalarRelationFilter = {
is?: Prisma.AffirmationCategoryWhereInput | null
isNot?: Prisma.AffirmationCategoryWhereInput | null
}
export type AffirmationCategoryListRelationFilter = {
every?: Prisma.AffirmationCategoryWhereInput
some?: Prisma.AffirmationCategoryWhereInput
none?: Prisma.AffirmationCategoryWhereInput
}
export type AffirmationCategoryOrderByRelationAggregateInput = {
_count?: Prisma.SortOrder
}
export type AffirmationCategoryCountOrderByAggregateInput = {
id?: Prisma.SortOrder
name?: Prisma.SortOrder
parentId?: Prisma.SortOrder
}
export type AffirmationCategoryAvgOrderByAggregateInput = {
id?: Prisma.SortOrder
parentId?: Prisma.SortOrder
}
export type AffirmationCategoryMaxOrderByAggregateInput = {
id?: Prisma.SortOrder
name?: Prisma.SortOrder
parentId?: Prisma.SortOrder
}
export type AffirmationCategoryMinOrderByAggregateInput = {
id?: Prisma.SortOrder
name?: Prisma.SortOrder
parentId?: Prisma.SortOrder
}
export type AffirmationCategorySumOrderByAggregateInput = {
id?: Prisma.SortOrder
parentId?: Prisma.SortOrder
}
export type AffirmationCategoryCreateNestedOneWithoutAffirmationsInput = {
@@ -306,13 +358,75 @@ export type AffirmationCategoryUpdateOneRequiredWithoutAffirmationsNestedInput =
update?: Prisma.XOR<Prisma.XOR<Prisma.AffirmationCategoryUpdateToOneWithWhereWithoutAffirmationsInput, Prisma.AffirmationCategoryUpdateWithoutAffirmationsInput>, Prisma.AffirmationCategoryUncheckedUpdateWithoutAffirmationsInput>
}
export type AffirmationCategoryCreateNestedOneWithoutChildrenInput = {
create?: Prisma.XOR<Prisma.AffirmationCategoryCreateWithoutChildrenInput, Prisma.AffirmationCategoryUncheckedCreateWithoutChildrenInput>
connectOrCreate?: Prisma.AffirmationCategoryCreateOrConnectWithoutChildrenInput
connect?: Prisma.AffirmationCategoryWhereUniqueInput
}
export type AffirmationCategoryCreateNestedManyWithoutParentInput = {
create?: Prisma.XOR<Prisma.AffirmationCategoryCreateWithoutParentInput, Prisma.AffirmationCategoryUncheckedCreateWithoutParentInput> | Prisma.AffirmationCategoryCreateWithoutParentInput[] | Prisma.AffirmationCategoryUncheckedCreateWithoutParentInput[]
connectOrCreate?: Prisma.AffirmationCategoryCreateOrConnectWithoutParentInput | Prisma.AffirmationCategoryCreateOrConnectWithoutParentInput[]
createMany?: Prisma.AffirmationCategoryCreateManyParentInputEnvelope
connect?: Prisma.AffirmationCategoryWhereUniqueInput | Prisma.AffirmationCategoryWhereUniqueInput[]
}
export type AffirmationCategoryUncheckedCreateNestedManyWithoutParentInput = {
create?: Prisma.XOR<Prisma.AffirmationCategoryCreateWithoutParentInput, Prisma.AffirmationCategoryUncheckedCreateWithoutParentInput> | Prisma.AffirmationCategoryCreateWithoutParentInput[] | Prisma.AffirmationCategoryUncheckedCreateWithoutParentInput[]
connectOrCreate?: Prisma.AffirmationCategoryCreateOrConnectWithoutParentInput | Prisma.AffirmationCategoryCreateOrConnectWithoutParentInput[]
createMany?: Prisma.AffirmationCategoryCreateManyParentInputEnvelope
connect?: Prisma.AffirmationCategoryWhereUniqueInput | Prisma.AffirmationCategoryWhereUniqueInput[]
}
export type AffirmationCategoryUpdateOneWithoutChildrenNestedInput = {
create?: Prisma.XOR<Prisma.AffirmationCategoryCreateWithoutChildrenInput, Prisma.AffirmationCategoryUncheckedCreateWithoutChildrenInput>
connectOrCreate?: Prisma.AffirmationCategoryCreateOrConnectWithoutChildrenInput
upsert?: Prisma.AffirmationCategoryUpsertWithoutChildrenInput
disconnect?: Prisma.AffirmationCategoryWhereInput | boolean
delete?: Prisma.AffirmationCategoryWhereInput | boolean
connect?: Prisma.AffirmationCategoryWhereUniqueInput
update?: Prisma.XOR<Prisma.XOR<Prisma.AffirmationCategoryUpdateToOneWithWhereWithoutChildrenInput, Prisma.AffirmationCategoryUpdateWithoutChildrenInput>, Prisma.AffirmationCategoryUncheckedUpdateWithoutChildrenInput>
}
export type AffirmationCategoryUpdateManyWithoutParentNestedInput = {
create?: Prisma.XOR<Prisma.AffirmationCategoryCreateWithoutParentInput, Prisma.AffirmationCategoryUncheckedCreateWithoutParentInput> | Prisma.AffirmationCategoryCreateWithoutParentInput[] | Prisma.AffirmationCategoryUncheckedCreateWithoutParentInput[]
connectOrCreate?: Prisma.AffirmationCategoryCreateOrConnectWithoutParentInput | Prisma.AffirmationCategoryCreateOrConnectWithoutParentInput[]
upsert?: Prisma.AffirmationCategoryUpsertWithWhereUniqueWithoutParentInput | Prisma.AffirmationCategoryUpsertWithWhereUniqueWithoutParentInput[]
createMany?: Prisma.AffirmationCategoryCreateManyParentInputEnvelope
set?: Prisma.AffirmationCategoryWhereUniqueInput | Prisma.AffirmationCategoryWhereUniqueInput[]
disconnect?: Prisma.AffirmationCategoryWhereUniqueInput | Prisma.AffirmationCategoryWhereUniqueInput[]
delete?: Prisma.AffirmationCategoryWhereUniqueInput | Prisma.AffirmationCategoryWhereUniqueInput[]
connect?: Prisma.AffirmationCategoryWhereUniqueInput | Prisma.AffirmationCategoryWhereUniqueInput[]
update?: Prisma.AffirmationCategoryUpdateWithWhereUniqueWithoutParentInput | Prisma.AffirmationCategoryUpdateWithWhereUniqueWithoutParentInput[]
updateMany?: Prisma.AffirmationCategoryUpdateManyWithWhereWithoutParentInput | Prisma.AffirmationCategoryUpdateManyWithWhereWithoutParentInput[]
deleteMany?: Prisma.AffirmationCategoryScalarWhereInput | Prisma.AffirmationCategoryScalarWhereInput[]
}
export type AffirmationCategoryUncheckedUpdateManyWithoutParentNestedInput = {
create?: Prisma.XOR<Prisma.AffirmationCategoryCreateWithoutParentInput, Prisma.AffirmationCategoryUncheckedCreateWithoutParentInput> | Prisma.AffirmationCategoryCreateWithoutParentInput[] | Prisma.AffirmationCategoryUncheckedCreateWithoutParentInput[]
connectOrCreate?: Prisma.AffirmationCategoryCreateOrConnectWithoutParentInput | Prisma.AffirmationCategoryCreateOrConnectWithoutParentInput[]
upsert?: Prisma.AffirmationCategoryUpsertWithWhereUniqueWithoutParentInput | Prisma.AffirmationCategoryUpsertWithWhereUniqueWithoutParentInput[]
createMany?: Prisma.AffirmationCategoryCreateManyParentInputEnvelope
set?: Prisma.AffirmationCategoryWhereUniqueInput | Prisma.AffirmationCategoryWhereUniqueInput[]
disconnect?: Prisma.AffirmationCategoryWhereUniqueInput | Prisma.AffirmationCategoryWhereUniqueInput[]
delete?: Prisma.AffirmationCategoryWhereUniqueInput | Prisma.AffirmationCategoryWhereUniqueInput[]
connect?: Prisma.AffirmationCategoryWhereUniqueInput | Prisma.AffirmationCategoryWhereUniqueInput[]
update?: Prisma.AffirmationCategoryUpdateWithWhereUniqueWithoutParentInput | Prisma.AffirmationCategoryUpdateWithWhereUniqueWithoutParentInput[]
updateMany?: Prisma.AffirmationCategoryUpdateManyWithWhereWithoutParentInput | Prisma.AffirmationCategoryUpdateManyWithWhereWithoutParentInput[]
deleteMany?: Prisma.AffirmationCategoryScalarWhereInput | Prisma.AffirmationCategoryScalarWhereInput[]
}
export type AffirmationCategoryCreateWithoutAffirmationsInput = {
name: string
parent?: Prisma.AffirmationCategoryCreateNestedOneWithoutChildrenInput
children?: Prisma.AffirmationCategoryCreateNestedManyWithoutParentInput
}
export type AffirmationCategoryUncheckedCreateWithoutAffirmationsInput = {
id?: number
name: string
parentId?: number | null
children?: Prisma.AffirmationCategoryUncheckedCreateNestedManyWithoutParentInput
}
export type AffirmationCategoryCreateOrConnectWithoutAffirmationsInput = {
@@ -333,11 +447,128 @@ export type AffirmationCategoryUpdateToOneWithWhereWithoutAffirmationsInput = {
export type AffirmationCategoryUpdateWithoutAffirmationsInput = {
name?: Prisma.StringFieldUpdateOperationsInput | string
parent?: Prisma.AffirmationCategoryUpdateOneWithoutChildrenNestedInput
children?: Prisma.AffirmationCategoryUpdateManyWithoutParentNestedInput
}
export type AffirmationCategoryUncheckedUpdateWithoutAffirmationsInput = {
id?: Prisma.IntFieldUpdateOperationsInput | number
name?: Prisma.StringFieldUpdateOperationsInput | string
parentId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
children?: Prisma.AffirmationCategoryUncheckedUpdateManyWithoutParentNestedInput
}
export type AffirmationCategoryCreateWithoutChildrenInput = {
name: string
parent?: Prisma.AffirmationCategoryCreateNestedOneWithoutChildrenInput
affirmations?: Prisma.AffirmationCreateNestedManyWithoutCategoryInput
}
export type AffirmationCategoryUncheckedCreateWithoutChildrenInput = {
id?: number
name: string
parentId?: number | null
affirmations?: Prisma.AffirmationUncheckedCreateNestedManyWithoutCategoryInput
}
export type AffirmationCategoryCreateOrConnectWithoutChildrenInput = {
where: Prisma.AffirmationCategoryWhereUniqueInput
create: Prisma.XOR<Prisma.AffirmationCategoryCreateWithoutChildrenInput, Prisma.AffirmationCategoryUncheckedCreateWithoutChildrenInput>
}
export type AffirmationCategoryCreateWithoutParentInput = {
name: string
children?: Prisma.AffirmationCategoryCreateNestedManyWithoutParentInput
affirmations?: Prisma.AffirmationCreateNestedManyWithoutCategoryInput
}
export type AffirmationCategoryUncheckedCreateWithoutParentInput = {
id?: number
name: string
children?: Prisma.AffirmationCategoryUncheckedCreateNestedManyWithoutParentInput
affirmations?: Prisma.AffirmationUncheckedCreateNestedManyWithoutCategoryInput
}
export type AffirmationCategoryCreateOrConnectWithoutParentInput = {
where: Prisma.AffirmationCategoryWhereUniqueInput
create: Prisma.XOR<Prisma.AffirmationCategoryCreateWithoutParentInput, Prisma.AffirmationCategoryUncheckedCreateWithoutParentInput>
}
export type AffirmationCategoryCreateManyParentInputEnvelope = {
data: Prisma.AffirmationCategoryCreateManyParentInput | Prisma.AffirmationCategoryCreateManyParentInput[]
skipDuplicates?: boolean
}
export type AffirmationCategoryUpsertWithoutChildrenInput = {
update: Prisma.XOR<Prisma.AffirmationCategoryUpdateWithoutChildrenInput, Prisma.AffirmationCategoryUncheckedUpdateWithoutChildrenInput>
create: Prisma.XOR<Prisma.AffirmationCategoryCreateWithoutChildrenInput, Prisma.AffirmationCategoryUncheckedCreateWithoutChildrenInput>
where?: Prisma.AffirmationCategoryWhereInput
}
export type AffirmationCategoryUpdateToOneWithWhereWithoutChildrenInput = {
where?: Prisma.AffirmationCategoryWhereInput
data: Prisma.XOR<Prisma.AffirmationCategoryUpdateWithoutChildrenInput, Prisma.AffirmationCategoryUncheckedUpdateWithoutChildrenInput>
}
export type AffirmationCategoryUpdateWithoutChildrenInput = {
name?: Prisma.StringFieldUpdateOperationsInput | string
parent?: Prisma.AffirmationCategoryUpdateOneWithoutChildrenNestedInput
affirmations?: Prisma.AffirmationUpdateManyWithoutCategoryNestedInput
}
export type AffirmationCategoryUncheckedUpdateWithoutChildrenInput = {
id?: Prisma.IntFieldUpdateOperationsInput | number
name?: Prisma.StringFieldUpdateOperationsInput | string
parentId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
affirmations?: Prisma.AffirmationUncheckedUpdateManyWithoutCategoryNestedInput
}
export type AffirmationCategoryUpsertWithWhereUniqueWithoutParentInput = {
where: Prisma.AffirmationCategoryWhereUniqueInput
update: Prisma.XOR<Prisma.AffirmationCategoryUpdateWithoutParentInput, Prisma.AffirmationCategoryUncheckedUpdateWithoutParentInput>
create: Prisma.XOR<Prisma.AffirmationCategoryCreateWithoutParentInput, Prisma.AffirmationCategoryUncheckedCreateWithoutParentInput>
}
export type AffirmationCategoryUpdateWithWhereUniqueWithoutParentInput = {
where: Prisma.AffirmationCategoryWhereUniqueInput
data: Prisma.XOR<Prisma.AffirmationCategoryUpdateWithoutParentInput, Prisma.AffirmationCategoryUncheckedUpdateWithoutParentInput>
}
export type AffirmationCategoryUpdateManyWithWhereWithoutParentInput = {
where: Prisma.AffirmationCategoryScalarWhereInput
data: Prisma.XOR<Prisma.AffirmationCategoryUpdateManyMutationInput, Prisma.AffirmationCategoryUncheckedUpdateManyWithoutParentInput>
}
export type AffirmationCategoryScalarWhereInput = {
AND?: Prisma.AffirmationCategoryScalarWhereInput | Prisma.AffirmationCategoryScalarWhereInput[]
OR?: Prisma.AffirmationCategoryScalarWhereInput[]
NOT?: Prisma.AffirmationCategoryScalarWhereInput | Prisma.AffirmationCategoryScalarWhereInput[]
id?: Prisma.IntFilter<"AffirmationCategory"> | number
name?: Prisma.StringFilter<"AffirmationCategory"> | string
parentId?: Prisma.IntNullableFilter<"AffirmationCategory"> | number | null
}
export type AffirmationCategoryCreateManyParentInput = {
id?: number
name: string
}
export type AffirmationCategoryUpdateWithoutParentInput = {
name?: Prisma.StringFieldUpdateOperationsInput | string
children?: Prisma.AffirmationCategoryUpdateManyWithoutParentNestedInput
affirmations?: Prisma.AffirmationUpdateManyWithoutCategoryNestedInput
}
export type AffirmationCategoryUncheckedUpdateWithoutParentInput = {
id?: Prisma.IntFieldUpdateOperationsInput | number
name?: Prisma.StringFieldUpdateOperationsInput | string
children?: Prisma.AffirmationCategoryUncheckedUpdateManyWithoutParentNestedInput
affirmations?: Prisma.AffirmationUncheckedUpdateManyWithoutCategoryNestedInput
}
export type AffirmationCategoryUncheckedUpdateManyWithoutParentInput = {
id?: Prisma.IntFieldUpdateOperationsInput | number
name?: Prisma.StringFieldUpdateOperationsInput | string
}
@@ -346,10 +577,12 @@ export type AffirmationCategoryUncheckedUpdateWithoutAffirmationsInput = {
*/
export type AffirmationCategoryCountOutputType = {
children: number
affirmations: number
}
export type AffirmationCategoryCountOutputTypeSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
children?: boolean | AffirmationCategoryCountOutputTypeCountChildrenArgs
affirmations?: boolean | AffirmationCategoryCountOutputTypeCountAffirmationsArgs
}
@@ -363,6 +596,13 @@ export type AffirmationCategoryCountOutputTypeDefaultArgs<ExtArgs extends runtim
select?: Prisma.AffirmationCategoryCountOutputTypeSelect<ExtArgs> | null
}
/**
* AffirmationCategoryCountOutputType without action
*/
export type AffirmationCategoryCountOutputTypeCountChildrenArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
where?: Prisma.AffirmationCategoryWhereInput
}
/**
* AffirmationCategoryCountOutputType without action
*/
@@ -374,6 +614,9 @@ export type AffirmationCategoryCountOutputTypeCountAffirmationsArgs<ExtArgs exte
export type AffirmationCategorySelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
id?: boolean
name?: boolean
parentId?: boolean
parent?: boolean | Prisma.AffirmationCategory$parentArgs<ExtArgs>
children?: boolean | Prisma.AffirmationCategory$childrenArgs<ExtArgs>
affirmations?: boolean | Prisma.AffirmationCategory$affirmationsArgs<ExtArgs>
_count?: boolean | Prisma.AffirmationCategoryCountOutputTypeDefaultArgs<ExtArgs>
}, ExtArgs["result"]["affirmationCategory"]>
@@ -381,34 +624,48 @@ export type AffirmationCategorySelect<ExtArgs extends runtime.Types.Extensions.I
export type AffirmationCategorySelectCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
id?: boolean
name?: boolean
parentId?: boolean
parent?: boolean | Prisma.AffirmationCategory$parentArgs<ExtArgs>
}, ExtArgs["result"]["affirmationCategory"]>
export type AffirmationCategorySelectUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
id?: boolean
name?: boolean
parentId?: boolean
parent?: boolean | Prisma.AffirmationCategory$parentArgs<ExtArgs>
}, ExtArgs["result"]["affirmationCategory"]>
export type AffirmationCategorySelectScalar = {
id?: boolean
name?: boolean
parentId?: boolean
}
export type AffirmationCategoryOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "name", ExtArgs["result"]["affirmationCategory"]>
export type AffirmationCategoryOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "name" | "parentId", ExtArgs["result"]["affirmationCategory"]>
export type AffirmationCategoryInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
parent?: boolean | Prisma.AffirmationCategory$parentArgs<ExtArgs>
children?: boolean | Prisma.AffirmationCategory$childrenArgs<ExtArgs>
affirmations?: boolean | Prisma.AffirmationCategory$affirmationsArgs<ExtArgs>
_count?: boolean | Prisma.AffirmationCategoryCountOutputTypeDefaultArgs<ExtArgs>
}
export type AffirmationCategoryIncludeCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {}
export type AffirmationCategoryIncludeUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {}
export type AffirmationCategoryIncludeCreateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
parent?: boolean | Prisma.AffirmationCategory$parentArgs<ExtArgs>
}
export type AffirmationCategoryIncludeUpdateManyAndReturn<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
parent?: boolean | Prisma.AffirmationCategory$parentArgs<ExtArgs>
}
export type $AffirmationCategoryPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
name: "AffirmationCategory"
objects: {
parent: Prisma.$AffirmationCategoryPayload<ExtArgs> | null
children: Prisma.$AffirmationCategoryPayload<ExtArgs>[]
affirmations: Prisma.$AffirmationPayload<ExtArgs>[]
}
scalars: runtime.Types.Extensions.GetPayloadResult<{
id: number
name: string
parentId: number | null
}, ExtArgs["result"]["affirmationCategory"]>
composites: {}
}
@@ -803,6 +1060,8 @@ readonly fields: AffirmationCategoryFieldRefs;
*/
export interface Prisma__AffirmationCategoryClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
readonly [Symbol.toStringTag]: "PrismaPromise"
parent<T extends Prisma.AffirmationCategory$parentArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.AffirmationCategory$parentArgs<ExtArgs>>): Prisma.Prisma__AffirmationCategoryClient<runtime.Types.Result.GetResult<Prisma.$AffirmationCategoryPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
children<T extends Prisma.AffirmationCategory$childrenArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.AffirmationCategory$childrenArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$AffirmationCategoryPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
affirmations<T extends Prisma.AffirmationCategory$affirmationsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.AffirmationCategory$affirmationsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$AffirmationPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
/**
* Attaches callbacks for the resolution and/or rejection of the Promise.
@@ -835,6 +1094,7 @@ export interface Prisma__AffirmationCategoryClient<T, Null = never, ExtArgs exte
export interface AffirmationCategoryFieldRefs {
readonly id: Prisma.FieldRef<"AffirmationCategory", 'Int'>
readonly name: Prisma.FieldRef<"AffirmationCategory", 'String'>
readonly parentId: Prisma.FieldRef<"AffirmationCategory", 'Int'>
}
@@ -1084,6 +1344,10 @@ export type AffirmationCategoryCreateManyAndReturnArgs<ExtArgs extends runtime.T
*/
data: Prisma.AffirmationCategoryCreateManyInput | Prisma.AffirmationCategoryCreateManyInput[]
skipDuplicates?: boolean
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.AffirmationCategoryIncludeCreateManyAndReturn<ExtArgs> | null
}
/**
@@ -1154,6 +1418,10 @@ export type AffirmationCategoryUpdateManyAndReturnArgs<ExtArgs extends runtime.T
* Limit how many AffirmationCategories to update.
*/
limit?: number
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.AffirmationCategoryIncludeUpdateManyAndReturn<ExtArgs> | null
}
/**
@@ -1222,6 +1490,49 @@ export type AffirmationCategoryDeleteManyArgs<ExtArgs extends runtime.Types.Exte
limit?: number
}
/**
* AffirmationCategory.parent
*/
export type AffirmationCategory$parentArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the AffirmationCategory
*/
select?: Prisma.AffirmationCategorySelect<ExtArgs> | null
/**
* Omit specific fields from the AffirmationCategory
*/
omit?: Prisma.AffirmationCategoryOmit<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.AffirmationCategoryInclude<ExtArgs> | null
where?: Prisma.AffirmationCategoryWhereInput
}
/**
* AffirmationCategory.children
*/
export type AffirmationCategory$childrenArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
/**
* Select specific fields to fetch from the AffirmationCategory
*/
select?: Prisma.AffirmationCategorySelect<ExtArgs> | null
/**
* Omit specific fields from the AffirmationCategory
*/
omit?: Prisma.AffirmationCategoryOmit<ExtArgs> | null
/**
* Choose, which related nodes to fetch as well
*/
include?: Prisma.AffirmationCategoryInclude<ExtArgs> | null
where?: Prisma.AffirmationCategoryWhereInput
orderBy?: Prisma.AffirmationCategoryOrderByWithRelationInput | Prisma.AffirmationCategoryOrderByWithRelationInput[]
cursor?: Prisma.AffirmationCategoryWhereUniqueInput
take?: number
skip?: number
distinct?: Prisma.AffirmationCategoryScalarFieldEnum | Prisma.AffirmationCategoryScalarFieldEnum[]
}
/**
* AffirmationCategory.affirmations
*/