Merge pull request #80 from yokowu/fix-ent

fix(ent): 修复未生成 setting ent
This commit is contained in:
Yoko
2025-07-15 11:56:22 +08:00
committed by GitHub
3 changed files with 0 additions and 19 deletions

View File

@@ -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.

View File

@@ -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.

View File

@@ -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.