提交
This commit is contained in:
@@ -46,7 +46,7 @@ type InboundOrder struct {
|
||||
Remark string `json:"remark,omitempty"`
|
||||
// 检测单号(入库检报告单号)
|
||||
InspectionNo string `json:"inspectionNo,omitempty"`
|
||||
// 归属类型 workorder/project/none
|
||||
// 归属类型 workorder/project/other
|
||||
OwnershipType string `json:"ownershipType,omitempty"`
|
||||
// 归属编号(合同号/科技项目号)
|
||||
OwnershipNo string `json:"ownershipNo,omitempty"`
|
||||
|
||||
@@ -42,6 +42,8 @@ type Material struct {
|
||||
SafetyStock int `json:"safetyStock,omitempty"`
|
||||
// 是否启用
|
||||
IsActive bool `json:"isActive,omitempty"`
|
||||
// WMS→MES 推送失败标记(手动重推清位)
|
||||
SyncPending bool `json:"syncPending,omitempty"`
|
||||
// 创建时间
|
||||
CreatedAt int64 `json:"createdAt,omitempty"`
|
||||
// 更新时间
|
||||
@@ -54,7 +56,7 @@ func (*Material) scanValues(columns []string) ([]any, error) {
|
||||
values := make([]any, len(columns))
|
||||
for i := range columns {
|
||||
switch columns[i] {
|
||||
case material.FieldIsBatchManaged, material.FieldIsSerialManaged, material.FieldIsActive:
|
||||
case material.FieldIsBatchManaged, material.FieldIsSerialManaged, material.FieldIsActive, material.FieldSyncPending:
|
||||
values[i] = new(sql.NullBool)
|
||||
case material.FieldID, material.FieldItemType, material.FieldManageMode, material.FieldSnMode, material.FieldSafetyStock, material.FieldCreatedAt, material.FieldUpdatedAt:
|
||||
values[i] = new(sql.NullInt64)
|
||||
@@ -159,6 +161,12 @@ func (_m *Material) assignValues(columns []string, values []any) error {
|
||||
} else if value.Valid {
|
||||
_m.IsActive = value.Bool
|
||||
}
|
||||
case material.FieldSyncPending:
|
||||
if value, ok := values[i].(*sql.NullBool); !ok {
|
||||
return fmt.Errorf("unexpected type %T for field sync_pending", values[i])
|
||||
} else if value.Valid {
|
||||
_m.SyncPending = value.Bool
|
||||
}
|
||||
case material.FieldCreatedAt:
|
||||
if value, ok := values[i].(*sql.NullInt64); !ok {
|
||||
return fmt.Errorf("unexpected type %T for field created_at", values[i])
|
||||
@@ -246,6 +254,9 @@ func (_m *Material) String() string {
|
||||
builder.WriteString("is_active=")
|
||||
builder.WriteString(fmt.Sprintf("%v", _m.IsActive))
|
||||
builder.WriteString(", ")
|
||||
builder.WriteString("sync_pending=")
|
||||
builder.WriteString(fmt.Sprintf("%v", _m.SyncPending))
|
||||
builder.WriteString(", ")
|
||||
builder.WriteString("created_at=")
|
||||
builder.WriteString(fmt.Sprintf("%v", _m.CreatedAt))
|
||||
builder.WriteString(", ")
|
||||
|
||||
@@ -37,6 +37,8 @@ const (
|
||||
FieldSafetyStock = "safety_stock"
|
||||
// FieldIsActive holds the string denoting the is_active field in the database.
|
||||
FieldIsActive = "is_active"
|
||||
// FieldSyncPending holds the string denoting the sync_pending field in the database.
|
||||
FieldSyncPending = "sync_pending"
|
||||
// FieldCreatedAt holds the string denoting the created_at field in the database.
|
||||
FieldCreatedAt = "created_at"
|
||||
// FieldUpdatedAt holds the string denoting the updated_at field in the database.
|
||||
@@ -61,6 +63,7 @@ var Columns = []string{
|
||||
FieldTemplateCode,
|
||||
FieldSafetyStock,
|
||||
FieldIsActive,
|
||||
FieldSyncPending,
|
||||
FieldCreatedAt,
|
||||
FieldUpdatedAt,
|
||||
}
|
||||
@@ -90,6 +93,8 @@ var (
|
||||
DefaultSafetyStock int
|
||||
// DefaultIsActive holds the default value on creation for the "is_active" field.
|
||||
DefaultIsActive bool
|
||||
// DefaultSyncPending holds the default value on creation for the "sync_pending" field.
|
||||
DefaultSyncPending bool
|
||||
// DefaultCreatedAt holds the default value on creation for the "created_at" field.
|
||||
DefaultCreatedAt func() int64
|
||||
// DefaultUpdatedAt holds the default value on creation for the "updated_at" field.
|
||||
@@ -169,6 +174,11 @@ func ByIsActive(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldIsActive, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// BySyncPending orders the results by the sync_pending field.
|
||||
func BySyncPending(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldSyncPending, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByCreatedAt orders the results by the created_at field.
|
||||
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldCreatedAt, opts...).ToFunc()
|
||||
|
||||
@@ -118,6 +118,11 @@ func IsActive(v bool) predicate.Material {
|
||||
return predicate.Material(sql.FieldEQ(FieldIsActive, v))
|
||||
}
|
||||
|
||||
// SyncPending applies equality check predicate on the "sync_pending" field. It's identical to SyncPendingEQ.
|
||||
func SyncPending(v bool) predicate.Material {
|
||||
return predicate.Material(sql.FieldEQ(FieldSyncPending, v))
|
||||
}
|
||||
|
||||
// CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
|
||||
func CreatedAt(v int64) predicate.Material {
|
||||
return predicate.Material(sql.FieldEQ(FieldCreatedAt, v))
|
||||
@@ -748,6 +753,16 @@ func IsActiveNEQ(v bool) predicate.Material {
|
||||
return predicate.Material(sql.FieldNEQ(FieldIsActive, v))
|
||||
}
|
||||
|
||||
// SyncPendingEQ applies the EQ predicate on the "sync_pending" field.
|
||||
func SyncPendingEQ(v bool) predicate.Material {
|
||||
return predicate.Material(sql.FieldEQ(FieldSyncPending, v))
|
||||
}
|
||||
|
||||
// SyncPendingNEQ applies the NEQ predicate on the "sync_pending" field.
|
||||
func SyncPendingNEQ(v bool) predicate.Material {
|
||||
return predicate.Material(sql.FieldNEQ(FieldSyncPending, v))
|
||||
}
|
||||
|
||||
// CreatedAtEQ applies the EQ predicate on the "created_at" field.
|
||||
func CreatedAtEQ(v int64) predicate.Material {
|
||||
return predicate.Material(sql.FieldEQ(FieldCreatedAt, v))
|
||||
|
||||
@@ -187,6 +187,20 @@ func (_c *MaterialCreate) SetNillableIsActive(v *bool) *MaterialCreate {
|
||||
return _c
|
||||
}
|
||||
|
||||
// SetSyncPending sets the "sync_pending" field.
|
||||
func (_c *MaterialCreate) SetSyncPending(v bool) *MaterialCreate {
|
||||
_c.mutation.SetSyncPending(v)
|
||||
return _c
|
||||
}
|
||||
|
||||
// SetNillableSyncPending sets the "sync_pending" field if the given value is not nil.
|
||||
func (_c *MaterialCreate) SetNillableSyncPending(v *bool) *MaterialCreate {
|
||||
if v != nil {
|
||||
_c.SetSyncPending(*v)
|
||||
}
|
||||
return _c
|
||||
}
|
||||
|
||||
// SetCreatedAt sets the "created_at" field.
|
||||
func (_c *MaterialCreate) SetCreatedAt(v int64) *MaterialCreate {
|
||||
_c.mutation.SetCreatedAt(v)
|
||||
@@ -278,6 +292,10 @@ func (_c *MaterialCreate) defaults() {
|
||||
v := material.DefaultIsActive
|
||||
_c.mutation.SetIsActive(v)
|
||||
}
|
||||
if _, ok := _c.mutation.SyncPending(); !ok {
|
||||
v := material.DefaultSyncPending
|
||||
_c.mutation.SetSyncPending(v)
|
||||
}
|
||||
if _, ok := _c.mutation.CreatedAt(); !ok {
|
||||
v := material.DefaultCreatedAt()
|
||||
_c.mutation.SetCreatedAt(v)
|
||||
@@ -317,6 +335,9 @@ func (_c *MaterialCreate) check() error {
|
||||
if _, ok := _c.mutation.IsActive(); !ok {
|
||||
return &ValidationError{Name: "is_active", err: errors.New(`ent: missing required field "Material.is_active"`)}
|
||||
}
|
||||
if _, ok := _c.mutation.SyncPending(); !ok {
|
||||
return &ValidationError{Name: "sync_pending", err: errors.New(`ent: missing required field "Material.sync_pending"`)}
|
||||
}
|
||||
if _, ok := _c.mutation.CreatedAt(); !ok {
|
||||
return &ValidationError{Name: "created_at", err: errors.New(`ent: missing required field "Material.created_at"`)}
|
||||
}
|
||||
@@ -402,6 +423,10 @@ func (_c *MaterialCreate) createSpec() (*Material, *sqlgraph.CreateSpec) {
|
||||
_spec.SetField(material.FieldIsActive, field.TypeBool, value)
|
||||
_node.IsActive = value
|
||||
}
|
||||
if value, ok := _c.mutation.SyncPending(); ok {
|
||||
_spec.SetField(material.FieldSyncPending, field.TypeBool, value)
|
||||
_node.SyncPending = value
|
||||
}
|
||||
if value, ok := _c.mutation.CreatedAt(); ok {
|
||||
_spec.SetField(material.FieldCreatedAt, field.TypeInt64, value)
|
||||
_node.CreatedAt = value
|
||||
@@ -666,6 +691,18 @@ func (u *MaterialUpsert) UpdateIsActive() *MaterialUpsert {
|
||||
return u
|
||||
}
|
||||
|
||||
// SetSyncPending sets the "sync_pending" field.
|
||||
func (u *MaterialUpsert) SetSyncPending(v bool) *MaterialUpsert {
|
||||
u.Set(material.FieldSyncPending, v)
|
||||
return u
|
||||
}
|
||||
|
||||
// UpdateSyncPending sets the "sync_pending" field to the value that was provided on create.
|
||||
func (u *MaterialUpsert) UpdateSyncPending() *MaterialUpsert {
|
||||
u.SetExcluded(material.FieldSyncPending)
|
||||
return u
|
||||
}
|
||||
|
||||
// SetCreatedAt sets the "created_at" field.
|
||||
func (u *MaterialUpsert) SetCreatedAt(v int64) *MaterialUpsert {
|
||||
u.Set(material.FieldCreatedAt, v)
|
||||
@@ -980,6 +1017,20 @@ func (u *MaterialUpsertOne) UpdateIsActive() *MaterialUpsertOne {
|
||||
})
|
||||
}
|
||||
|
||||
// SetSyncPending sets the "sync_pending" field.
|
||||
func (u *MaterialUpsertOne) SetSyncPending(v bool) *MaterialUpsertOne {
|
||||
return u.Update(func(s *MaterialUpsert) {
|
||||
s.SetSyncPending(v)
|
||||
})
|
||||
}
|
||||
|
||||
// UpdateSyncPending sets the "sync_pending" field to the value that was provided on create.
|
||||
func (u *MaterialUpsertOne) UpdateSyncPending() *MaterialUpsertOne {
|
||||
return u.Update(func(s *MaterialUpsert) {
|
||||
s.UpdateSyncPending()
|
||||
})
|
||||
}
|
||||
|
||||
// SetCreatedAt sets the "created_at" field.
|
||||
func (u *MaterialUpsertOne) SetCreatedAt(v int64) *MaterialUpsertOne {
|
||||
return u.Update(func(s *MaterialUpsert) {
|
||||
@@ -1464,6 +1515,20 @@ func (u *MaterialUpsertBulk) UpdateIsActive() *MaterialUpsertBulk {
|
||||
})
|
||||
}
|
||||
|
||||
// SetSyncPending sets the "sync_pending" field.
|
||||
func (u *MaterialUpsertBulk) SetSyncPending(v bool) *MaterialUpsertBulk {
|
||||
return u.Update(func(s *MaterialUpsert) {
|
||||
s.SetSyncPending(v)
|
||||
})
|
||||
}
|
||||
|
||||
// UpdateSyncPending sets the "sync_pending" field to the value that was provided on create.
|
||||
func (u *MaterialUpsertBulk) UpdateSyncPending() *MaterialUpsertBulk {
|
||||
return u.Update(func(s *MaterialUpsert) {
|
||||
s.UpdateSyncPending()
|
||||
})
|
||||
}
|
||||
|
||||
// SetCreatedAt sets the "created_at" field.
|
||||
func (u *MaterialUpsertBulk) SetCreatedAt(v int64) *MaterialUpsertBulk {
|
||||
return u.Update(func(s *MaterialUpsert) {
|
||||
|
||||
@@ -261,6 +261,20 @@ func (_u *MaterialUpdate) SetNillableIsActive(v *bool) *MaterialUpdate {
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetSyncPending sets the "sync_pending" field.
|
||||
func (_u *MaterialUpdate) SetSyncPending(v bool) *MaterialUpdate {
|
||||
_u.mutation.SetSyncPending(v)
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetNillableSyncPending sets the "sync_pending" field if the given value is not nil.
|
||||
func (_u *MaterialUpdate) SetNillableSyncPending(v *bool) *MaterialUpdate {
|
||||
if v != nil {
|
||||
_u.SetSyncPending(*v)
|
||||
}
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetCreatedAt sets the "created_at" field.
|
||||
func (_u *MaterialUpdate) SetCreatedAt(v int64) *MaterialUpdate {
|
||||
_u.mutation.ResetCreatedAt()
|
||||
@@ -407,6 +421,9 @@ func (_u *MaterialUpdate) sqlSave(ctx context.Context) (_node int, err error) {
|
||||
if value, ok := _u.mutation.IsActive(); ok {
|
||||
_spec.SetField(material.FieldIsActive, field.TypeBool, value)
|
||||
}
|
||||
if value, ok := _u.mutation.SyncPending(); ok {
|
||||
_spec.SetField(material.FieldSyncPending, field.TypeBool, value)
|
||||
}
|
||||
if value, ok := _u.mutation.CreatedAt(); ok {
|
||||
_spec.SetField(material.FieldCreatedAt, field.TypeInt64, value)
|
||||
}
|
||||
@@ -673,6 +690,20 @@ func (_u *MaterialUpdateOne) SetNillableIsActive(v *bool) *MaterialUpdateOne {
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetSyncPending sets the "sync_pending" field.
|
||||
func (_u *MaterialUpdateOne) SetSyncPending(v bool) *MaterialUpdateOne {
|
||||
_u.mutation.SetSyncPending(v)
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetNillableSyncPending sets the "sync_pending" field if the given value is not nil.
|
||||
func (_u *MaterialUpdateOne) SetNillableSyncPending(v *bool) *MaterialUpdateOne {
|
||||
if v != nil {
|
||||
_u.SetSyncPending(*v)
|
||||
}
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetCreatedAt sets the "created_at" field.
|
||||
func (_u *MaterialUpdateOne) SetCreatedAt(v int64) *MaterialUpdateOne {
|
||||
_u.mutation.ResetCreatedAt()
|
||||
@@ -849,6 +880,9 @@ func (_u *MaterialUpdateOne) sqlSave(ctx context.Context) (_node *Material, err
|
||||
if value, ok := _u.mutation.IsActive(); ok {
|
||||
_spec.SetField(material.FieldIsActive, field.TypeBool, value)
|
||||
}
|
||||
if value, ok := _u.mutation.SyncPending(); ok {
|
||||
_spec.SetField(material.FieldSyncPending, field.TypeBool, value)
|
||||
}
|
||||
if value, ok := _u.mutation.CreatedAt(); ok {
|
||||
_spec.SetField(material.FieldCreatedAt, field.TypeInt64, value)
|
||||
}
|
||||
|
||||
@@ -140,7 +140,7 @@ var (
|
||||
{Name: "operator", Type: field.TypeString, Nullable: true, Comment: "操作人"},
|
||||
{Name: "remark", Type: field.TypeString, Nullable: true, Comment: "备注"},
|
||||
{Name: "inspection_no", Type: field.TypeString, Comment: "检测单号(入库检报告单号)"},
|
||||
{Name: "ownership_type", Type: field.TypeString, Comment: "归属类型 workorder/project/none", Default: "none"},
|
||||
{Name: "ownership_type", Type: field.TypeString, Comment: "归属类型 workorder/project/other", Default: "other"},
|
||||
{Name: "ownership_no", Type: field.TypeString, Nullable: true, Comment: "归属编号(合同号/科技项目号)"},
|
||||
{Name: "product_work_no", Type: field.TypeString, Nullable: true, Comment: "产品工号(手填)"},
|
||||
{Name: "quality_status", Type: field.TypeString, Nullable: true, Comment: "质量状态 合格/不合格/部分(空=未关联检验)"},
|
||||
@@ -374,6 +374,7 @@ var (
|
||||
{Name: "template_code", Type: field.TypeString, Nullable: true, Comment: "物料模板编码(物料种类)"},
|
||||
{Name: "safety_stock", Type: field.TypeInt, Comment: "安全库存(低于则缺货预警,0=不预警)", Default: 0},
|
||||
{Name: "is_active", Type: field.TypeBool, Comment: "是否启用", Default: true},
|
||||
{Name: "sync_pending", Type: field.TypeBool, Comment: "WMS→MES 推送失败标记(手动重推清位)", Default: false},
|
||||
{Name: "created_at", Type: field.TypeInt64, Comment: "创建时间"},
|
||||
{Name: "updated_at", Type: field.TypeInt64, Comment: "更新时间"},
|
||||
}
|
||||
|
||||
@@ -10862,6 +10862,7 @@ type MaterialMutation struct {
|
||||
safety_stock *int
|
||||
addsafety_stock *int
|
||||
is_active *bool
|
||||
sync_pending *bool
|
||||
created_at *int64
|
||||
addcreated_at *int64
|
||||
updated_at *int64
|
||||
@@ -11570,6 +11571,42 @@ func (m *MaterialMutation) ResetIsActive() {
|
||||
m.is_active = nil
|
||||
}
|
||||
|
||||
// SetSyncPending sets the "sync_pending" field.
|
||||
func (m *MaterialMutation) SetSyncPending(b bool) {
|
||||
m.sync_pending = &b
|
||||
}
|
||||
|
||||
// SyncPending returns the value of the "sync_pending" field in the mutation.
|
||||
func (m *MaterialMutation) SyncPending() (r bool, exists bool) {
|
||||
v := m.sync_pending
|
||||
if v == nil {
|
||||
return
|
||||
}
|
||||
return *v, true
|
||||
}
|
||||
|
||||
// OldSyncPending returns the old "sync_pending" field's value of the Material entity.
|
||||
// If the Material object wasn't provided to the builder, the object is fetched from the database.
|
||||
// An error is returned if the mutation operation is not UpdateOne, or the database query fails.
|
||||
func (m *MaterialMutation) OldSyncPending(ctx context.Context) (v bool, err error) {
|
||||
if !m.op.Is(OpUpdateOne) {
|
||||
return v, errors.New("OldSyncPending is only allowed on UpdateOne operations")
|
||||
}
|
||||
if m.id == nil || m.oldValue == nil {
|
||||
return v, errors.New("OldSyncPending requires an ID field in the mutation")
|
||||
}
|
||||
oldValue, err := m.oldValue(ctx)
|
||||
if err != nil {
|
||||
return v, fmt.Errorf("querying old value for OldSyncPending: %w", err)
|
||||
}
|
||||
return oldValue.SyncPending, nil
|
||||
}
|
||||
|
||||
// ResetSyncPending resets all changes to the "sync_pending" field.
|
||||
func (m *MaterialMutation) ResetSyncPending() {
|
||||
m.sync_pending = nil
|
||||
}
|
||||
|
||||
// SetCreatedAt sets the "created_at" field.
|
||||
func (m *MaterialMutation) SetCreatedAt(i int64) {
|
||||
m.created_at = &i
|
||||
@@ -11716,7 +11753,7 @@ func (m *MaterialMutation) Type() string {
|
||||
// order to get all numeric fields that were incremented/decremented, call
|
||||
// AddedFields().
|
||||
func (m *MaterialMutation) Fields() []string {
|
||||
fields := make([]string, 0, 15)
|
||||
fields := make([]string, 0, 16)
|
||||
if m.code != nil {
|
||||
fields = append(fields, material.FieldCode)
|
||||
}
|
||||
@@ -11756,6 +11793,9 @@ func (m *MaterialMutation) Fields() []string {
|
||||
if m.is_active != nil {
|
||||
fields = append(fields, material.FieldIsActive)
|
||||
}
|
||||
if m.sync_pending != nil {
|
||||
fields = append(fields, material.FieldSyncPending)
|
||||
}
|
||||
if m.created_at != nil {
|
||||
fields = append(fields, material.FieldCreatedAt)
|
||||
}
|
||||
@@ -11796,6 +11836,8 @@ func (m *MaterialMutation) Field(name string) (ent.Value, bool) {
|
||||
return m.SafetyStock()
|
||||
case material.FieldIsActive:
|
||||
return m.IsActive()
|
||||
case material.FieldSyncPending:
|
||||
return m.SyncPending()
|
||||
case material.FieldCreatedAt:
|
||||
return m.CreatedAt()
|
||||
case material.FieldUpdatedAt:
|
||||
@@ -11835,6 +11877,8 @@ func (m *MaterialMutation) OldField(ctx context.Context, name string) (ent.Value
|
||||
return m.OldSafetyStock(ctx)
|
||||
case material.FieldIsActive:
|
||||
return m.OldIsActive(ctx)
|
||||
case material.FieldSyncPending:
|
||||
return m.OldSyncPending(ctx)
|
||||
case material.FieldCreatedAt:
|
||||
return m.OldCreatedAt(ctx)
|
||||
case material.FieldUpdatedAt:
|
||||
@@ -11939,6 +11983,13 @@ func (m *MaterialMutation) SetField(name string, value ent.Value) error {
|
||||
}
|
||||
m.SetIsActive(v)
|
||||
return nil
|
||||
case material.FieldSyncPending:
|
||||
v, ok := value.(bool)
|
||||
if !ok {
|
||||
return fmt.Errorf("unexpected type %T for field %s", value, name)
|
||||
}
|
||||
m.SetSyncPending(v)
|
||||
return nil
|
||||
case material.FieldCreatedAt:
|
||||
v, ok := value.(int64)
|
||||
if !ok {
|
||||
@@ -12143,6 +12194,9 @@ func (m *MaterialMutation) ResetField(name string) error {
|
||||
case material.FieldIsActive:
|
||||
m.ResetIsActive()
|
||||
return nil
|
||||
case material.FieldSyncPending:
|
||||
m.ResetSyncPending()
|
||||
return nil
|
||||
case material.FieldCreatedAt:
|
||||
m.ResetCreatedAt()
|
||||
return nil
|
||||
|
||||
@@ -262,12 +262,16 @@ func init() {
|
||||
materialDescIsActive := materialFields[12].Descriptor()
|
||||
// material.DefaultIsActive holds the default value on creation for the is_active field.
|
||||
material.DefaultIsActive = materialDescIsActive.Default.(bool)
|
||||
// materialDescSyncPending is the schema descriptor for sync_pending field.
|
||||
materialDescSyncPending := materialFields[13].Descriptor()
|
||||
// material.DefaultSyncPending holds the default value on creation for the sync_pending field.
|
||||
material.DefaultSyncPending = materialDescSyncPending.Default.(bool)
|
||||
// materialDescCreatedAt is the schema descriptor for created_at field.
|
||||
materialDescCreatedAt := materialFields[13].Descriptor()
|
||||
materialDescCreatedAt := materialFields[14].Descriptor()
|
||||
// material.DefaultCreatedAt holds the default value on creation for the created_at field.
|
||||
material.DefaultCreatedAt = materialDescCreatedAt.Default.(func() int64)
|
||||
// materialDescUpdatedAt is the schema descriptor for updated_at field.
|
||||
materialDescUpdatedAt := materialFields[14].Descriptor()
|
||||
materialDescUpdatedAt := materialFields[15].Descriptor()
|
||||
// material.DefaultUpdatedAt holds the default value on creation for the updated_at field.
|
||||
material.DefaultUpdatedAt = materialDescUpdatedAt.Default.(func() int64)
|
||||
materialdemandFields := schema.MaterialDemand{}.Fields()
|
||||
|
||||
Reference in New Issue
Block a user