diff --git a/backend/db/runtime/runtime.go b/backend/db/runtime/runtime.go index 074ee59..ad4cdb4 100644 --- a/backend/db/runtime/runtime.go +++ b/backend/db/runtime/runtime.go @@ -246,10 +246,6 @@ func init() { setting.DefaultUpdatedAt = settingDescUpdatedAt.Default.(func() time.Time) // setting.UpdateDefaultUpdatedAt holds the default value on update for the updated_at field. setting.UpdateDefaultUpdatedAt = settingDescUpdatedAt.UpdateDefault.(func() time.Time) - // settingDescID is the schema descriptor for id field. - settingDescID := settingFields[0].Descriptor() - // setting.DefaultID holds the default value on creation for the id field. - setting.DefaultID = settingDescID.Default.(func() uuid.UUID) taskFields := schema.Task{}.Fields() _ = taskFields // taskDescIsAccept is the schema descriptor for is_accept field. diff --git a/backend/db/setting/setting.go b/backend/db/setting/setting.go index a159865..0b3b4c6 100644 --- a/backend/db/setting/setting.go +++ b/backend/db/setting/setting.go @@ -6,7 +6,6 @@ import ( "time" "entgo.io/ent/dialect/sql" - "github.com/google/uuid" ) const ( @@ -72,8 +71,6 @@ var ( DefaultUpdatedAt func() time.Time // UpdateDefaultUpdatedAt holds the default value on update for the "updated_at" field. UpdateDefaultUpdatedAt func() time.Time - // DefaultID holds the default value on creation for the "id" field. - DefaultID func() uuid.UUID ) // OrderOption defines the ordering options for the Setting queries. diff --git a/backend/db/setting_create.go b/backend/db/setting_create.go index 4569e40..6fa6a35 100644 --- a/backend/db/setting_create.go +++ b/backend/db/setting_create.go @@ -127,14 +127,6 @@ func (sc *SettingCreate) SetID(u uuid.UUID) *SettingCreate { return sc } -// SetNillableID sets the "id" field if the given value is not nil. -func (sc *SettingCreate) SetNillableID(u *uuid.UUID) *SettingCreate { - if u != nil { - sc.SetID(*u) - } - return sc -} - // Mutation returns the SettingMutation object of the builder. func (sc *SettingCreate) Mutation() *SettingMutation { return sc.mutation @@ -194,10 +186,6 @@ func (sc *SettingCreate) defaults() { v := setting.DefaultUpdatedAt() sc.mutation.SetUpdatedAt(v) } - if _, ok := sc.mutation.ID(); !ok { - v := setting.DefaultID() - sc.mutation.SetID(v) - } } // check runs all checks and user-defined validators on the builder.