Skip to content

Commit

Permalink
feat: add city and zipcode + some fixes
Browse files Browse the repository at this point in the history
Mep
  • Loading branch information
ledouxm authored Jul 24, 2024
2 parents 7e04857 + 8a23a91 commit c6bc3e3
Show file tree
Hide file tree
Showing 8 changed files with 154 additions and 35 deletions.
1 change: 1 addition & 0 deletions db/migrations/906-add_report_zipcode.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE "report" ADD COLUMN "zipCode" TEXT;
45 changes: 36 additions & 9 deletions packages/electric-client/src/generated/client/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const Pdf_snapshotScalarFieldEnumSchema = z.enum(['id','report_id','html'

export const QueryModeSchema = z.enum(['default','insensitive']);

export const ReportScalarFieldEnumSchema = z.enum(['id','title','projectDescription','redactedBy','meetDate','applicantName','applicantAddress','projectCadastralRef','projectSpaceType','decision','precisions','contacts','furtherInformation','createdBy','createdAt','serviceInstructeur','pdf','disabled','udap_id','redactedById','applicantEmail','city']);
export const ReportScalarFieldEnumSchema = z.enum(['id','title','projectDescription','redactedBy','meetDate','applicantName','applicantAddress','projectCadastralRef','projectSpaceType','decision','precisions','contacts','furtherInformation','createdBy','createdAt','serviceInstructeur','pdf','disabled','udap_id','redactedById','applicantEmail','city','zipCode']);

export const Service_instructeursScalarFieldEnumSchema = z.enum(['id','full_name','short_name','email','tel','udap_id']);

Expand Down Expand Up @@ -119,6 +119,7 @@ export const ReportSchema = z.object({
redactedById: z.string().nullable(),
applicantEmail: z.string().nullable(),
city: z.string().nullable(),
zipCode: z.string().nullable(),
})

export type Report = z.infer<typeof ReportSchema>
Expand Down Expand Up @@ -265,6 +266,7 @@ export const ReportSelectSchema: z.ZodType<Prisma.ReportSelect> = z.object({
redactedById: z.boolean().optional(),
applicantEmail: z.boolean().optional(),
city: z.boolean().optional(),
zipCode: z.boolean().optional(),
user: z.union([z.boolean(),z.lazy(() => UserArgsSchema)]).optional(),
}).strict()

Expand Down Expand Up @@ -565,6 +567,7 @@ export const ReportWhereInputSchema: z.ZodType<Prisma.ReportWhereInput> = z.obje
redactedById: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(),
applicantEmail: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(),
city: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(),
zipCode: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(),
user: z.union([ z.lazy(() => UserRelationFilterSchema),z.lazy(() => UserWhereInputSchema) ]).optional(),
}).strict();

Expand All @@ -591,6 +594,7 @@ export const ReportOrderByWithRelationInputSchema: z.ZodType<Prisma.ReportOrderB
redactedById: z.lazy(() => SortOrderSchema).optional(),
applicantEmail: z.lazy(() => SortOrderSchema).optional(),
city: z.lazy(() => SortOrderSchema).optional(),
zipCode: z.lazy(() => SortOrderSchema).optional(),
user: z.lazy(() => UserOrderByWithRelationInputSchema).optional()
}).strict();

Expand Down Expand Up @@ -621,6 +625,7 @@ export const ReportOrderByWithAggregationInputSchema: z.ZodType<Prisma.ReportOrd
redactedById: z.lazy(() => SortOrderSchema).optional(),
applicantEmail: z.lazy(() => SortOrderSchema).optional(),
city: z.lazy(() => SortOrderSchema).optional(),
zipCode: z.lazy(() => SortOrderSchema).optional(),
_count: z.lazy(() => ReportCountOrderByAggregateInputSchema).optional(),
_avg: z.lazy(() => ReportAvgOrderByAggregateInputSchema).optional(),
_max: z.lazy(() => ReportMaxOrderByAggregateInputSchema).optional(),
Expand Down Expand Up @@ -654,6 +659,7 @@ export const ReportScalarWhereWithAggregatesInputSchema: z.ZodType<Prisma.Report
redactedById: z.union([ z.lazy(() => StringNullableWithAggregatesFilterSchema),z.string() ]).optional().nullable(),
applicantEmail: z.union([ z.lazy(() => StringNullableWithAggregatesFilterSchema),z.string() ]).optional().nullable(),
city: z.union([ z.lazy(() => StringNullableWithAggregatesFilterSchema),z.string() ]).optional().nullable(),
zipCode: z.union([ z.lazy(() => StringNullableWithAggregatesFilterSchema),z.string() ]).optional().nullable(),
}).strict();

export const Service_instructeursWhereInputSchema: z.ZodType<Prisma.Service_instructeursWhereInput> = z.object({
Expand Down Expand Up @@ -1061,6 +1067,7 @@ export const ReportCreateInputSchema: z.ZodType<Prisma.ReportCreateInput> = z.ob
redactedById: z.string().optional().nullable(),
applicantEmail: z.string().optional().nullable(),
city: z.string().optional().nullable(),
zipCode: z.string().optional().nullable(),
user: z.lazy(() => UserCreateNestedOneWithoutReportInputSchema)
}).strict();

Expand All @@ -1086,7 +1093,8 @@ export const ReportUncheckedCreateInputSchema: z.ZodType<Prisma.ReportUncheckedC
udap_id: z.string().optional().nullable(),
redactedById: z.string().optional().nullable(),
applicantEmail: z.string().optional().nullable(),
city: z.string().optional().nullable()
city: z.string().optional().nullable(),
zipCode: z.string().optional().nullable()
}).strict();

export const ReportUpdateInputSchema: z.ZodType<Prisma.ReportUpdateInput> = z.object({
Expand All @@ -1111,6 +1119,7 @@ export const ReportUpdateInputSchema: z.ZodType<Prisma.ReportUpdateInput> = z.ob
redactedById: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(),
applicantEmail: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(),
city: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(),
zipCode: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(),
user: z.lazy(() => UserUpdateOneRequiredWithoutReportNestedInputSchema).optional()
}).strict();

Expand All @@ -1137,6 +1146,7 @@ export const ReportUncheckedUpdateInputSchema: z.ZodType<Prisma.ReportUncheckedU
redactedById: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(),
applicantEmail: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(),
city: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(),
zipCode: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(),
}).strict();

export const ReportCreateManyInputSchema: z.ZodType<Prisma.ReportCreateManyInput> = z.object({
Expand All @@ -1161,7 +1171,8 @@ export const ReportCreateManyInputSchema: z.ZodType<Prisma.ReportCreateManyInput
udap_id: z.string().optional().nullable(),
redactedById: z.string().optional().nullable(),
applicantEmail: z.string().optional().nullable(),
city: z.string().optional().nullable()
city: z.string().optional().nullable(),
zipCode: z.string().optional().nullable()
}).strict();

export const ReportUpdateManyMutationInputSchema: z.ZodType<Prisma.ReportUpdateManyMutationInput> = z.object({
Expand All @@ -1186,6 +1197,7 @@ export const ReportUpdateManyMutationInputSchema: z.ZodType<Prisma.ReportUpdateM
redactedById: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(),
applicantEmail: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(),
city: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(),
zipCode: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(),
}).strict();

export const ReportUncheckedUpdateManyInputSchema: z.ZodType<Prisma.ReportUncheckedUpdateManyInput> = z.object({
Expand All @@ -1211,6 +1223,7 @@ export const ReportUncheckedUpdateManyInputSchema: z.ZodType<Prisma.ReportUnchec
redactedById: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(),
applicantEmail: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(),
city: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(),
zipCode: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(),
}).strict();

export const Service_instructeursCreateInputSchema: z.ZodType<Prisma.Service_instructeursCreateInput> = z.object({
Expand Down Expand Up @@ -1709,7 +1722,8 @@ export const ReportCountOrderByAggregateInputSchema: z.ZodType<Prisma.ReportCoun
udap_id: z.lazy(() => SortOrderSchema).optional(),
redactedById: z.lazy(() => SortOrderSchema).optional(),
applicantEmail: z.lazy(() => SortOrderSchema).optional(),
city: z.lazy(() => SortOrderSchema).optional()
city: z.lazy(() => SortOrderSchema).optional(),
zipCode: z.lazy(() => SortOrderSchema).optional()
}).strict();

export const ReportAvgOrderByAggregateInputSchema: z.ZodType<Prisma.ReportAvgOrderByAggregateInput> = z.object({
Expand Down Expand Up @@ -1738,7 +1752,8 @@ export const ReportMaxOrderByAggregateInputSchema: z.ZodType<Prisma.ReportMaxOrd
udap_id: z.lazy(() => SortOrderSchema).optional(),
redactedById: z.lazy(() => SortOrderSchema).optional(),
applicantEmail: z.lazy(() => SortOrderSchema).optional(),
city: z.lazy(() => SortOrderSchema).optional()
city: z.lazy(() => SortOrderSchema).optional(),
zipCode: z.lazy(() => SortOrderSchema).optional()
}).strict();

export const ReportMinOrderByAggregateInputSchema: z.ZodType<Prisma.ReportMinOrderByAggregateInput> = z.object({
Expand All @@ -1763,7 +1778,8 @@ export const ReportMinOrderByAggregateInputSchema: z.ZodType<Prisma.ReportMinOrd
udap_id: z.lazy(() => SortOrderSchema).optional(),
redactedById: z.lazy(() => SortOrderSchema).optional(),
applicantEmail: z.lazy(() => SortOrderSchema).optional(),
city: z.lazy(() => SortOrderSchema).optional()
city: z.lazy(() => SortOrderSchema).optional(),
zipCode: z.lazy(() => SortOrderSchema).optional()
}).strict();

export const ReportSumOrderByAggregateInputSchema: z.ZodType<Prisma.ReportSumOrderByAggregateInput> = z.object({
Expand Down Expand Up @@ -2656,7 +2672,8 @@ export const ReportCreateWithoutUserInputSchema: z.ZodType<Prisma.ReportCreateWi
udap_id: z.string().optional().nullable(),
redactedById: z.string().optional().nullable(),
applicantEmail: z.string().optional().nullable(),
city: z.string().optional().nullable()
city: z.string().optional().nullable(),
zipCode: z.string().optional().nullable()
}).strict();

export const ReportUncheckedCreateWithoutUserInputSchema: z.ZodType<Prisma.ReportUncheckedCreateWithoutUserInput> = z.object({
Expand All @@ -2680,7 +2697,8 @@ export const ReportUncheckedCreateWithoutUserInputSchema: z.ZodType<Prisma.Repor
udap_id: z.string().optional().nullable(),
redactedById: z.string().optional().nullable(),
applicantEmail: z.string().optional().nullable(),
city: z.string().optional().nullable()
city: z.string().optional().nullable(),
zipCode: z.string().optional().nullable()
}).strict();

export const ReportCreateOrConnectWithoutUserInputSchema: z.ZodType<Prisma.ReportCreateOrConnectWithoutUserInput> = z.object({
Expand Down Expand Up @@ -2812,6 +2830,7 @@ export const ReportScalarWhereInputSchema: z.ZodType<Prisma.ReportScalarWhereInp
redactedById: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(),
applicantEmail: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(),
city: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(),
zipCode: z.union([ z.lazy(() => StringNullableFilterSchema),z.string() ]).optional().nullable(),
}).strict();

export const UdapUpsertWithoutUserInputSchema: z.ZodType<Prisma.UdapUpsertWithoutUserInput> = z.object({
Expand Down Expand Up @@ -2906,7 +2925,8 @@ export const ReportCreateManyUserInputSchema: z.ZodType<Prisma.ReportCreateManyU
udap_id: z.string().optional().nullable(),
redactedById: z.string().optional().nullable(),
applicantEmail: z.string().optional().nullable(),
city: z.string().optional().nullable()
city: z.string().optional().nullable(),
zipCode: z.string().optional().nullable()
}).strict();

export const DelegationUpdateWithoutUser_delegation_createdByTouserInputSchema: z.ZodType<Prisma.DelegationUpdateWithoutUser_delegation_createdByTouserInput> = z.object({
Expand Down Expand Up @@ -2955,6 +2975,7 @@ export const ReportUpdateWithoutUserInputSchema: z.ZodType<Prisma.ReportUpdateWi
redactedById: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(),
applicantEmail: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(),
city: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(),
zipCode: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(),
}).strict();

export const ReportUncheckedUpdateWithoutUserInputSchema: z.ZodType<Prisma.ReportUncheckedUpdateWithoutUserInput> = z.object({
Expand All @@ -2979,6 +3000,7 @@ export const ReportUncheckedUpdateWithoutUserInputSchema: z.ZodType<Prisma.Repor
redactedById: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(),
applicantEmail: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(),
city: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(),
zipCode: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(),
}).strict();

export const ReportUncheckedUpdateManyWithoutReportInputSchema: z.ZodType<Prisma.ReportUncheckedUpdateManyWithoutReportInput> = z.object({
Expand All @@ -3003,6 +3025,7 @@ export const ReportUncheckedUpdateManyWithoutReportInputSchema: z.ZodType<Prisma
redactedById: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(),
applicantEmail: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(),
city: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(),
zipCode: z.union([ z.string(),z.lazy(() => NullableStringFieldUpdateOperationsInputSchema) ]).optional().nullable(),
}).strict();

/////////////////////////////////////////
Expand Down Expand Up @@ -4117,6 +4140,10 @@ export const tableSchemas = {
[
"city",
"TEXT"
],
[
"zipCode",
"TEXT"
]
]),
relations: [
Expand Down
Loading

0 comments on commit c6bc3e3

Please sign in to comment.