From 487a6a7e12f03a25223ac49a5b7335a2c71fb87a Mon Sep 17 00:00:00 2001 From: gabriel ruttner Date: Wed, 18 Sep 2024 15:57:19 -0400 Subject: [PATCH] chore: gen --- pkg/repository/prisma/db/db_gen.go | 62 +++++++++++++++++++++++++++--- 1 file changed, 57 insertions(+), 5 deletions(-) diff --git a/pkg/repository/prisma/db/db_gen.go b/pkg/repository/prisma/db/db_gen.go index 4defc4f51..a7d018b6b 100644 --- a/pkg/repository/prisma/db/db_gen.go +++ b/pkg/repository/prisma/db/db_gen.go @@ -1270,7 +1270,7 @@ enum StepRunStatus { model StepRun { // base fields - id_uuid String @default(uuid()) @db.Uuid + id_uuid String? @db.Uuid id BigInt @id @default(autoincrement()) @db.BigInt @@ -10579,7 +10579,7 @@ type StepRunModel struct { // InnerStepRun holds the actual data type InnerStepRun struct { - IDUUID string `json:"id_uuid"` + IDUUID *string `json:"id_uuid,omitempty"` ID BigInt `json:"id"` CreatedAt DateTime `json:"createdAt"` UpdatedAt DateTime `json:"updatedAt"` @@ -10612,7 +10612,7 @@ type InnerStepRun struct { // RawStepRunModel is a struct for StepRun when used in raw queries type RawStepRunModel struct { - IDUUID RawString `json:"id_uuid"` + IDUUID *RawString `json:"id_uuid,omitempty"` ID RawBigInt `json:"id"` CreatedAt RawDateTime `json:"createdAt"` UpdatedAt RawDateTime `json:"updatedAt"` @@ -10651,6 +10651,13 @@ type RelationsStepRun struct { Logs []LogLineModel `json:"logs,omitempty"` } +func (r StepRunModel) IDUUID() (value String, ok bool) { + if r.InnerStepRun.IDUUID == nil { + return value, false + } + return *r.InnerStepRun.IDUUID, true +} + func (r StepRunModel) DeletedAt() (value DateTime, ok bool) { if r.InnerStepRun.DeletedAt == nil { return value, false @@ -137447,7 +137454,7 @@ type stepRunQuery struct { // IDUUID // - // @required + // @optional IDUUID stepRunQueryIDUUIDString // ID @@ -137653,7 +137660,7 @@ func (stepRunQuery) And(params ...StepRunWhereParam) stepRunDefaultParam { // base struct type stepRunQueryIDUUIDString struct{} -// Set the required value of IDUUID +// Set the optional value of IDUUID func (r stepRunQueryIDUUIDString) Set(value string) stepRunSetParam { return stepRunSetParam{ @@ -137674,6 +137681,22 @@ func (r stepRunQueryIDUUIDString) SetIfPresent(value *String) stepRunSetParam { return r.Set(*value) } +// Set the optional value of IDUUID dynamically +func (r stepRunQueryIDUUIDString) SetOptional(value *String) stepRunSetParam { + if value == nil { + + var v *string + return stepRunSetParam{ + data: builder.Field{ + Name: "id_uuid", + Value: v, + }, + } + } + + return r.Set(*value) +} + func (r stepRunQueryIDUUIDString) Equals(value string) stepRunWithPrismaIDUUIDEqualsParam { return stepRunWithPrismaIDUUIDEqualsParam{ @@ -137696,6 +137719,35 @@ func (r stepRunQueryIDUUIDString) EqualsIfPresent(value *string) stepRunWithPris return r.Equals(*value) } +func (r stepRunQueryIDUUIDString) EqualsOptional(value *String) stepRunDefaultParam { + return stepRunDefaultParam{ + data: builder.Field{ + Name: "id_uuid", + Fields: []builder.Field{ + { + Name: "equals", + Value: value, + }, + }, + }, + } +} + +func (r stepRunQueryIDUUIDString) IsNull() stepRunDefaultParam { + var str *string = nil + return stepRunDefaultParam{ + data: builder.Field{ + Name: "id_uuid", + Fields: []builder.Field{ + { + Name: "equals", + Value: str, + }, + }, + }, + } +} + func (r stepRunQueryIDUUIDString) Order(direction SortOrder) stepRunDefaultParam { return stepRunDefaultParam{ data: builder.Field{