feat(mes): 添加定时同步可生产数量到WMS及BOM项相关标准字段
- 在main.go中添加定时任务每10分钟同步可生产数量到WMS系统 - 为BomItem实体添加relatedStandard字段及相关CRUD方法 - 为InspectionRecord实体添加reportNo、materialCode、materialName等字段 - 更新ent schema确保新字段的验证和默认值设置 - 添加必要的数据库迁移和字段映射逻辑
This commit is contained in:
@@ -145,6 +145,48 @@ func (_c *InventoryCreate) SetNillableZoneCode(v *string) *InventoryCreate {
|
||||
return _c
|
||||
}
|
||||
|
||||
// SetShelfNo sets the "shelf_no" field.
|
||||
func (_c *InventoryCreate) SetShelfNo(v string) *InventoryCreate {
|
||||
_c.mutation.SetShelfNo(v)
|
||||
return _c
|
||||
}
|
||||
|
||||
// SetNillableShelfNo sets the "shelf_no" field if the given value is not nil.
|
||||
func (_c *InventoryCreate) SetNillableShelfNo(v *string) *InventoryCreate {
|
||||
if v != nil {
|
||||
_c.SetShelfNo(*v)
|
||||
}
|
||||
return _c
|
||||
}
|
||||
|
||||
// SetLayerNo sets the "layer_no" field.
|
||||
func (_c *InventoryCreate) SetLayerNo(v string) *InventoryCreate {
|
||||
_c.mutation.SetLayerNo(v)
|
||||
return _c
|
||||
}
|
||||
|
||||
// SetNillableLayerNo sets the "layer_no" field if the given value is not nil.
|
||||
func (_c *InventoryCreate) SetNillableLayerNo(v *string) *InventoryCreate {
|
||||
if v != nil {
|
||||
_c.SetLayerNo(*v)
|
||||
}
|
||||
return _c
|
||||
}
|
||||
|
||||
// SetPositionNo sets the "position_no" field.
|
||||
func (_c *InventoryCreate) SetPositionNo(v string) *InventoryCreate {
|
||||
_c.mutation.SetPositionNo(v)
|
||||
return _c
|
||||
}
|
||||
|
||||
// SetNillablePositionNo sets the "position_no" field if the given value is not nil.
|
||||
func (_c *InventoryCreate) SetNillablePositionNo(v *string) *InventoryCreate {
|
||||
if v != nil {
|
||||
_c.SetPositionNo(*v)
|
||||
}
|
||||
return _c
|
||||
}
|
||||
|
||||
// SetStatus sets the "status" field.
|
||||
func (_c *InventoryCreate) SetStatus(v string) *InventoryCreate {
|
||||
_c.mutation.SetStatus(v)
|
||||
@@ -229,6 +271,118 @@ func (_c *InventoryCreate) SetNillableCompletedProcess(v *string) *InventoryCrea
|
||||
return _c
|
||||
}
|
||||
|
||||
// SetOwnershipType sets the "ownership_type" field.
|
||||
func (_c *InventoryCreate) SetOwnershipType(v string) *InventoryCreate {
|
||||
_c.mutation.SetOwnershipType(v)
|
||||
return _c
|
||||
}
|
||||
|
||||
// SetNillableOwnershipType sets the "ownership_type" field if the given value is not nil.
|
||||
func (_c *InventoryCreate) SetNillableOwnershipType(v *string) *InventoryCreate {
|
||||
if v != nil {
|
||||
_c.SetOwnershipType(*v)
|
||||
}
|
||||
return _c
|
||||
}
|
||||
|
||||
// SetOwnershipNo sets the "ownership_no" field.
|
||||
func (_c *InventoryCreate) SetOwnershipNo(v string) *InventoryCreate {
|
||||
_c.mutation.SetOwnershipNo(v)
|
||||
return _c
|
||||
}
|
||||
|
||||
// SetNillableOwnershipNo sets the "ownership_no" field if the given value is not nil.
|
||||
func (_c *InventoryCreate) SetNillableOwnershipNo(v *string) *InventoryCreate {
|
||||
if v != nil {
|
||||
_c.SetOwnershipNo(*v)
|
||||
}
|
||||
return _c
|
||||
}
|
||||
|
||||
// SetProductStatus sets the "product_status" field.
|
||||
func (_c *InventoryCreate) SetProductStatus(v string) *InventoryCreate {
|
||||
_c.mutation.SetProductStatus(v)
|
||||
return _c
|
||||
}
|
||||
|
||||
// SetNillableProductStatus sets the "product_status" field if the given value is not nil.
|
||||
func (_c *InventoryCreate) SetNillableProductStatus(v *string) *InventoryCreate {
|
||||
if v != nil {
|
||||
_c.SetProductStatus(*v)
|
||||
}
|
||||
return _c
|
||||
}
|
||||
|
||||
// SetRelatedStandard sets the "related_standard" field.
|
||||
func (_c *InventoryCreate) SetRelatedStandard(v string) *InventoryCreate {
|
||||
_c.mutation.SetRelatedStandard(v)
|
||||
return _c
|
||||
}
|
||||
|
||||
// SetNillableRelatedStandard sets the "related_standard" field if the given value is not nil.
|
||||
func (_c *InventoryCreate) SetNillableRelatedStandard(v *string) *InventoryCreate {
|
||||
if v != nil {
|
||||
_c.SetRelatedStandard(*v)
|
||||
}
|
||||
return _c
|
||||
}
|
||||
|
||||
// SetTestRecordNo sets the "test_record_no" field.
|
||||
func (_c *InventoryCreate) SetTestRecordNo(v string) *InventoryCreate {
|
||||
_c.mutation.SetTestRecordNo(v)
|
||||
return _c
|
||||
}
|
||||
|
||||
// SetNillableTestRecordNo sets the "test_record_no" field if the given value is not nil.
|
||||
func (_c *InventoryCreate) SetNillableTestRecordNo(v *string) *InventoryCreate {
|
||||
if v != nil {
|
||||
_c.SetTestRecordNo(*v)
|
||||
}
|
||||
return _c
|
||||
}
|
||||
|
||||
// SetRecordedBy sets the "recorded_by" field.
|
||||
func (_c *InventoryCreate) SetRecordedBy(v string) *InventoryCreate {
|
||||
_c.mutation.SetRecordedBy(v)
|
||||
return _c
|
||||
}
|
||||
|
||||
// SetNillableRecordedBy sets the "recorded_by" field if the given value is not nil.
|
||||
func (_c *InventoryCreate) SetNillableRecordedBy(v *string) *InventoryCreate {
|
||||
if v != nil {
|
||||
_c.SetRecordedBy(*v)
|
||||
}
|
||||
return _c
|
||||
}
|
||||
|
||||
// SetRecordedAt sets the "recorded_at" field.
|
||||
func (_c *InventoryCreate) SetRecordedAt(v int64) *InventoryCreate {
|
||||
_c.mutation.SetRecordedAt(v)
|
||||
return _c
|
||||
}
|
||||
|
||||
// SetNillableRecordedAt sets the "recorded_at" field if the given value is not nil.
|
||||
func (_c *InventoryCreate) SetNillableRecordedAt(v *int64) *InventoryCreate {
|
||||
if v != nil {
|
||||
_c.SetRecordedAt(*v)
|
||||
}
|
||||
return _c
|
||||
}
|
||||
|
||||
// SetOutboundReason sets the "outbound_reason" field.
|
||||
func (_c *InventoryCreate) SetOutboundReason(v string) *InventoryCreate {
|
||||
_c.mutation.SetOutboundReason(v)
|
||||
return _c
|
||||
}
|
||||
|
||||
// SetNillableOutboundReason sets the "outbound_reason" field if the given value is not nil.
|
||||
func (_c *InventoryCreate) SetNillableOutboundReason(v *string) *InventoryCreate {
|
||||
if v != nil {
|
||||
_c.SetOutboundReason(*v)
|
||||
}
|
||||
return _c
|
||||
}
|
||||
|
||||
// SetRemark sets the "remark" field.
|
||||
func (_c *InventoryCreate) SetRemark(v string) *InventoryCreate {
|
||||
_c.mutation.SetRemark(v)
|
||||
@@ -456,6 +610,18 @@ func (_c *InventoryCreate) createSpec() (*Inventory, *sqlgraph.CreateSpec) {
|
||||
_spec.SetField(inventory.FieldZoneCode, field.TypeString, value)
|
||||
_node.ZoneCode = value
|
||||
}
|
||||
if value, ok := _c.mutation.ShelfNo(); ok {
|
||||
_spec.SetField(inventory.FieldShelfNo, field.TypeString, value)
|
||||
_node.ShelfNo = value
|
||||
}
|
||||
if value, ok := _c.mutation.LayerNo(); ok {
|
||||
_spec.SetField(inventory.FieldLayerNo, field.TypeString, value)
|
||||
_node.LayerNo = value
|
||||
}
|
||||
if value, ok := _c.mutation.PositionNo(); ok {
|
||||
_spec.SetField(inventory.FieldPositionNo, field.TypeString, value)
|
||||
_node.PositionNo = value
|
||||
}
|
||||
if value, ok := _c.mutation.Status(); ok {
|
||||
_spec.SetField(inventory.FieldStatus, field.TypeString, value)
|
||||
_node.Status = value
|
||||
@@ -480,6 +646,38 @@ func (_c *InventoryCreate) createSpec() (*Inventory, *sqlgraph.CreateSpec) {
|
||||
_spec.SetField(inventory.FieldCompletedProcess, field.TypeString, value)
|
||||
_node.CompletedProcess = value
|
||||
}
|
||||
if value, ok := _c.mutation.OwnershipType(); ok {
|
||||
_spec.SetField(inventory.FieldOwnershipType, field.TypeString, value)
|
||||
_node.OwnershipType = value
|
||||
}
|
||||
if value, ok := _c.mutation.OwnershipNo(); ok {
|
||||
_spec.SetField(inventory.FieldOwnershipNo, field.TypeString, value)
|
||||
_node.OwnershipNo = value
|
||||
}
|
||||
if value, ok := _c.mutation.ProductStatus(); ok {
|
||||
_spec.SetField(inventory.FieldProductStatus, field.TypeString, value)
|
||||
_node.ProductStatus = value
|
||||
}
|
||||
if value, ok := _c.mutation.RelatedStandard(); ok {
|
||||
_spec.SetField(inventory.FieldRelatedStandard, field.TypeString, value)
|
||||
_node.RelatedStandard = value
|
||||
}
|
||||
if value, ok := _c.mutation.TestRecordNo(); ok {
|
||||
_spec.SetField(inventory.FieldTestRecordNo, field.TypeString, value)
|
||||
_node.TestRecordNo = value
|
||||
}
|
||||
if value, ok := _c.mutation.RecordedBy(); ok {
|
||||
_spec.SetField(inventory.FieldRecordedBy, field.TypeString, value)
|
||||
_node.RecordedBy = value
|
||||
}
|
||||
if value, ok := _c.mutation.RecordedAt(); ok {
|
||||
_spec.SetField(inventory.FieldRecordedAt, field.TypeInt64, value)
|
||||
_node.RecordedAt = value
|
||||
}
|
||||
if value, ok := _c.mutation.OutboundReason(); ok {
|
||||
_spec.SetField(inventory.FieldOutboundReason, field.TypeString, value)
|
||||
_node.OutboundReason = value
|
||||
}
|
||||
if value, ok := _c.mutation.Remark(); ok {
|
||||
_spec.SetField(inventory.FieldRemark, field.TypeString, value)
|
||||
_node.Remark = value
|
||||
@@ -712,6 +910,60 @@ func (u *InventoryUpsert) ClearZoneCode() *InventoryUpsert {
|
||||
return u
|
||||
}
|
||||
|
||||
// SetShelfNo sets the "shelf_no" field.
|
||||
func (u *InventoryUpsert) SetShelfNo(v string) *InventoryUpsert {
|
||||
u.Set(inventory.FieldShelfNo, v)
|
||||
return u
|
||||
}
|
||||
|
||||
// UpdateShelfNo sets the "shelf_no" field to the value that was provided on create.
|
||||
func (u *InventoryUpsert) UpdateShelfNo() *InventoryUpsert {
|
||||
u.SetExcluded(inventory.FieldShelfNo)
|
||||
return u
|
||||
}
|
||||
|
||||
// ClearShelfNo clears the value of the "shelf_no" field.
|
||||
func (u *InventoryUpsert) ClearShelfNo() *InventoryUpsert {
|
||||
u.SetNull(inventory.FieldShelfNo)
|
||||
return u
|
||||
}
|
||||
|
||||
// SetLayerNo sets the "layer_no" field.
|
||||
func (u *InventoryUpsert) SetLayerNo(v string) *InventoryUpsert {
|
||||
u.Set(inventory.FieldLayerNo, v)
|
||||
return u
|
||||
}
|
||||
|
||||
// UpdateLayerNo sets the "layer_no" field to the value that was provided on create.
|
||||
func (u *InventoryUpsert) UpdateLayerNo() *InventoryUpsert {
|
||||
u.SetExcluded(inventory.FieldLayerNo)
|
||||
return u
|
||||
}
|
||||
|
||||
// ClearLayerNo clears the value of the "layer_no" field.
|
||||
func (u *InventoryUpsert) ClearLayerNo() *InventoryUpsert {
|
||||
u.SetNull(inventory.FieldLayerNo)
|
||||
return u
|
||||
}
|
||||
|
||||
// SetPositionNo sets the "position_no" field.
|
||||
func (u *InventoryUpsert) SetPositionNo(v string) *InventoryUpsert {
|
||||
u.Set(inventory.FieldPositionNo, v)
|
||||
return u
|
||||
}
|
||||
|
||||
// UpdatePositionNo sets the "position_no" field to the value that was provided on create.
|
||||
func (u *InventoryUpsert) UpdatePositionNo() *InventoryUpsert {
|
||||
u.SetExcluded(inventory.FieldPositionNo)
|
||||
return u
|
||||
}
|
||||
|
||||
// ClearPositionNo clears the value of the "position_no" field.
|
||||
func (u *InventoryUpsert) ClearPositionNo() *InventoryUpsert {
|
||||
u.SetNull(inventory.FieldPositionNo)
|
||||
return u
|
||||
}
|
||||
|
||||
// SetStatus sets the "status" field.
|
||||
func (u *InventoryUpsert) SetStatus(v string) *InventoryUpsert {
|
||||
u.Set(inventory.FieldStatus, v)
|
||||
@@ -802,6 +1054,156 @@ func (u *InventoryUpsert) UpdateCompletedProcess() *InventoryUpsert {
|
||||
return u
|
||||
}
|
||||
|
||||
// SetOwnershipType sets the "ownership_type" field.
|
||||
func (u *InventoryUpsert) SetOwnershipType(v string) *InventoryUpsert {
|
||||
u.Set(inventory.FieldOwnershipType, v)
|
||||
return u
|
||||
}
|
||||
|
||||
// UpdateOwnershipType sets the "ownership_type" field to the value that was provided on create.
|
||||
func (u *InventoryUpsert) UpdateOwnershipType() *InventoryUpsert {
|
||||
u.SetExcluded(inventory.FieldOwnershipType)
|
||||
return u
|
||||
}
|
||||
|
||||
// ClearOwnershipType clears the value of the "ownership_type" field.
|
||||
func (u *InventoryUpsert) ClearOwnershipType() *InventoryUpsert {
|
||||
u.SetNull(inventory.FieldOwnershipType)
|
||||
return u
|
||||
}
|
||||
|
||||
// SetOwnershipNo sets the "ownership_no" field.
|
||||
func (u *InventoryUpsert) SetOwnershipNo(v string) *InventoryUpsert {
|
||||
u.Set(inventory.FieldOwnershipNo, v)
|
||||
return u
|
||||
}
|
||||
|
||||
// UpdateOwnershipNo sets the "ownership_no" field to the value that was provided on create.
|
||||
func (u *InventoryUpsert) UpdateOwnershipNo() *InventoryUpsert {
|
||||
u.SetExcluded(inventory.FieldOwnershipNo)
|
||||
return u
|
||||
}
|
||||
|
||||
// ClearOwnershipNo clears the value of the "ownership_no" field.
|
||||
func (u *InventoryUpsert) ClearOwnershipNo() *InventoryUpsert {
|
||||
u.SetNull(inventory.FieldOwnershipNo)
|
||||
return u
|
||||
}
|
||||
|
||||
// SetProductStatus sets the "product_status" field.
|
||||
func (u *InventoryUpsert) SetProductStatus(v string) *InventoryUpsert {
|
||||
u.Set(inventory.FieldProductStatus, v)
|
||||
return u
|
||||
}
|
||||
|
||||
// UpdateProductStatus sets the "product_status" field to the value that was provided on create.
|
||||
func (u *InventoryUpsert) UpdateProductStatus() *InventoryUpsert {
|
||||
u.SetExcluded(inventory.FieldProductStatus)
|
||||
return u
|
||||
}
|
||||
|
||||
// ClearProductStatus clears the value of the "product_status" field.
|
||||
func (u *InventoryUpsert) ClearProductStatus() *InventoryUpsert {
|
||||
u.SetNull(inventory.FieldProductStatus)
|
||||
return u
|
||||
}
|
||||
|
||||
// SetRelatedStandard sets the "related_standard" field.
|
||||
func (u *InventoryUpsert) SetRelatedStandard(v string) *InventoryUpsert {
|
||||
u.Set(inventory.FieldRelatedStandard, v)
|
||||
return u
|
||||
}
|
||||
|
||||
// UpdateRelatedStandard sets the "related_standard" field to the value that was provided on create.
|
||||
func (u *InventoryUpsert) UpdateRelatedStandard() *InventoryUpsert {
|
||||
u.SetExcluded(inventory.FieldRelatedStandard)
|
||||
return u
|
||||
}
|
||||
|
||||
// ClearRelatedStandard clears the value of the "related_standard" field.
|
||||
func (u *InventoryUpsert) ClearRelatedStandard() *InventoryUpsert {
|
||||
u.SetNull(inventory.FieldRelatedStandard)
|
||||
return u
|
||||
}
|
||||
|
||||
// SetTestRecordNo sets the "test_record_no" field.
|
||||
func (u *InventoryUpsert) SetTestRecordNo(v string) *InventoryUpsert {
|
||||
u.Set(inventory.FieldTestRecordNo, v)
|
||||
return u
|
||||
}
|
||||
|
||||
// UpdateTestRecordNo sets the "test_record_no" field to the value that was provided on create.
|
||||
func (u *InventoryUpsert) UpdateTestRecordNo() *InventoryUpsert {
|
||||
u.SetExcluded(inventory.FieldTestRecordNo)
|
||||
return u
|
||||
}
|
||||
|
||||
// ClearTestRecordNo clears the value of the "test_record_no" field.
|
||||
func (u *InventoryUpsert) ClearTestRecordNo() *InventoryUpsert {
|
||||
u.SetNull(inventory.FieldTestRecordNo)
|
||||
return u
|
||||
}
|
||||
|
||||
// SetRecordedBy sets the "recorded_by" field.
|
||||
func (u *InventoryUpsert) SetRecordedBy(v string) *InventoryUpsert {
|
||||
u.Set(inventory.FieldRecordedBy, v)
|
||||
return u
|
||||
}
|
||||
|
||||
// UpdateRecordedBy sets the "recorded_by" field to the value that was provided on create.
|
||||
func (u *InventoryUpsert) UpdateRecordedBy() *InventoryUpsert {
|
||||
u.SetExcluded(inventory.FieldRecordedBy)
|
||||
return u
|
||||
}
|
||||
|
||||
// ClearRecordedBy clears the value of the "recorded_by" field.
|
||||
func (u *InventoryUpsert) ClearRecordedBy() *InventoryUpsert {
|
||||
u.SetNull(inventory.FieldRecordedBy)
|
||||
return u
|
||||
}
|
||||
|
||||
// SetRecordedAt sets the "recorded_at" field.
|
||||
func (u *InventoryUpsert) SetRecordedAt(v int64) *InventoryUpsert {
|
||||
u.Set(inventory.FieldRecordedAt, v)
|
||||
return u
|
||||
}
|
||||
|
||||
// UpdateRecordedAt sets the "recorded_at" field to the value that was provided on create.
|
||||
func (u *InventoryUpsert) UpdateRecordedAt() *InventoryUpsert {
|
||||
u.SetExcluded(inventory.FieldRecordedAt)
|
||||
return u
|
||||
}
|
||||
|
||||
// AddRecordedAt adds v to the "recorded_at" field.
|
||||
func (u *InventoryUpsert) AddRecordedAt(v int64) *InventoryUpsert {
|
||||
u.Add(inventory.FieldRecordedAt, v)
|
||||
return u
|
||||
}
|
||||
|
||||
// ClearRecordedAt clears the value of the "recorded_at" field.
|
||||
func (u *InventoryUpsert) ClearRecordedAt() *InventoryUpsert {
|
||||
u.SetNull(inventory.FieldRecordedAt)
|
||||
return u
|
||||
}
|
||||
|
||||
// SetOutboundReason sets the "outbound_reason" field.
|
||||
func (u *InventoryUpsert) SetOutboundReason(v string) *InventoryUpsert {
|
||||
u.Set(inventory.FieldOutboundReason, v)
|
||||
return u
|
||||
}
|
||||
|
||||
// UpdateOutboundReason sets the "outbound_reason" field to the value that was provided on create.
|
||||
func (u *InventoryUpsert) UpdateOutboundReason() *InventoryUpsert {
|
||||
u.SetExcluded(inventory.FieldOutboundReason)
|
||||
return u
|
||||
}
|
||||
|
||||
// ClearOutboundReason clears the value of the "outbound_reason" field.
|
||||
func (u *InventoryUpsert) ClearOutboundReason() *InventoryUpsert {
|
||||
u.SetNull(inventory.FieldOutboundReason)
|
||||
return u
|
||||
}
|
||||
|
||||
// SetRemark sets the "remark" field.
|
||||
func (u *InventoryUpsert) SetRemark(v string) *InventoryUpsert {
|
||||
u.Set(inventory.FieldRemark, v)
|
||||
@@ -1092,6 +1494,69 @@ func (u *InventoryUpsertOne) ClearZoneCode() *InventoryUpsertOne {
|
||||
})
|
||||
}
|
||||
|
||||
// SetShelfNo sets the "shelf_no" field.
|
||||
func (u *InventoryUpsertOne) SetShelfNo(v string) *InventoryUpsertOne {
|
||||
return u.Update(func(s *InventoryUpsert) {
|
||||
s.SetShelfNo(v)
|
||||
})
|
||||
}
|
||||
|
||||
// UpdateShelfNo sets the "shelf_no" field to the value that was provided on create.
|
||||
func (u *InventoryUpsertOne) UpdateShelfNo() *InventoryUpsertOne {
|
||||
return u.Update(func(s *InventoryUpsert) {
|
||||
s.UpdateShelfNo()
|
||||
})
|
||||
}
|
||||
|
||||
// ClearShelfNo clears the value of the "shelf_no" field.
|
||||
func (u *InventoryUpsertOne) ClearShelfNo() *InventoryUpsertOne {
|
||||
return u.Update(func(s *InventoryUpsert) {
|
||||
s.ClearShelfNo()
|
||||
})
|
||||
}
|
||||
|
||||
// SetLayerNo sets the "layer_no" field.
|
||||
func (u *InventoryUpsertOne) SetLayerNo(v string) *InventoryUpsertOne {
|
||||
return u.Update(func(s *InventoryUpsert) {
|
||||
s.SetLayerNo(v)
|
||||
})
|
||||
}
|
||||
|
||||
// UpdateLayerNo sets the "layer_no" field to the value that was provided on create.
|
||||
func (u *InventoryUpsertOne) UpdateLayerNo() *InventoryUpsertOne {
|
||||
return u.Update(func(s *InventoryUpsert) {
|
||||
s.UpdateLayerNo()
|
||||
})
|
||||
}
|
||||
|
||||
// ClearLayerNo clears the value of the "layer_no" field.
|
||||
func (u *InventoryUpsertOne) ClearLayerNo() *InventoryUpsertOne {
|
||||
return u.Update(func(s *InventoryUpsert) {
|
||||
s.ClearLayerNo()
|
||||
})
|
||||
}
|
||||
|
||||
// SetPositionNo sets the "position_no" field.
|
||||
func (u *InventoryUpsertOne) SetPositionNo(v string) *InventoryUpsertOne {
|
||||
return u.Update(func(s *InventoryUpsert) {
|
||||
s.SetPositionNo(v)
|
||||
})
|
||||
}
|
||||
|
||||
// UpdatePositionNo sets the "position_no" field to the value that was provided on create.
|
||||
func (u *InventoryUpsertOne) UpdatePositionNo() *InventoryUpsertOne {
|
||||
return u.Update(func(s *InventoryUpsert) {
|
||||
s.UpdatePositionNo()
|
||||
})
|
||||
}
|
||||
|
||||
// ClearPositionNo clears the value of the "position_no" field.
|
||||
func (u *InventoryUpsertOne) ClearPositionNo() *InventoryUpsertOne {
|
||||
return u.Update(func(s *InventoryUpsert) {
|
||||
s.ClearPositionNo()
|
||||
})
|
||||
}
|
||||
|
||||
// SetStatus sets the "status" field.
|
||||
func (u *InventoryUpsertOne) SetStatus(v string) *InventoryUpsertOne {
|
||||
return u.Update(func(s *InventoryUpsert) {
|
||||
@@ -1197,6 +1662,181 @@ func (u *InventoryUpsertOne) UpdateCompletedProcess() *InventoryUpsertOne {
|
||||
})
|
||||
}
|
||||
|
||||
// SetOwnershipType sets the "ownership_type" field.
|
||||
func (u *InventoryUpsertOne) SetOwnershipType(v string) *InventoryUpsertOne {
|
||||
return u.Update(func(s *InventoryUpsert) {
|
||||
s.SetOwnershipType(v)
|
||||
})
|
||||
}
|
||||
|
||||
// UpdateOwnershipType sets the "ownership_type" field to the value that was provided on create.
|
||||
func (u *InventoryUpsertOne) UpdateOwnershipType() *InventoryUpsertOne {
|
||||
return u.Update(func(s *InventoryUpsert) {
|
||||
s.UpdateOwnershipType()
|
||||
})
|
||||
}
|
||||
|
||||
// ClearOwnershipType clears the value of the "ownership_type" field.
|
||||
func (u *InventoryUpsertOne) ClearOwnershipType() *InventoryUpsertOne {
|
||||
return u.Update(func(s *InventoryUpsert) {
|
||||
s.ClearOwnershipType()
|
||||
})
|
||||
}
|
||||
|
||||
// SetOwnershipNo sets the "ownership_no" field.
|
||||
func (u *InventoryUpsertOne) SetOwnershipNo(v string) *InventoryUpsertOne {
|
||||
return u.Update(func(s *InventoryUpsert) {
|
||||
s.SetOwnershipNo(v)
|
||||
})
|
||||
}
|
||||
|
||||
// UpdateOwnershipNo sets the "ownership_no" field to the value that was provided on create.
|
||||
func (u *InventoryUpsertOne) UpdateOwnershipNo() *InventoryUpsertOne {
|
||||
return u.Update(func(s *InventoryUpsert) {
|
||||
s.UpdateOwnershipNo()
|
||||
})
|
||||
}
|
||||
|
||||
// ClearOwnershipNo clears the value of the "ownership_no" field.
|
||||
func (u *InventoryUpsertOne) ClearOwnershipNo() *InventoryUpsertOne {
|
||||
return u.Update(func(s *InventoryUpsert) {
|
||||
s.ClearOwnershipNo()
|
||||
})
|
||||
}
|
||||
|
||||
// SetProductStatus sets the "product_status" field.
|
||||
func (u *InventoryUpsertOne) SetProductStatus(v string) *InventoryUpsertOne {
|
||||
return u.Update(func(s *InventoryUpsert) {
|
||||
s.SetProductStatus(v)
|
||||
})
|
||||
}
|
||||
|
||||
// UpdateProductStatus sets the "product_status" field to the value that was provided on create.
|
||||
func (u *InventoryUpsertOne) UpdateProductStatus() *InventoryUpsertOne {
|
||||
return u.Update(func(s *InventoryUpsert) {
|
||||
s.UpdateProductStatus()
|
||||
})
|
||||
}
|
||||
|
||||
// ClearProductStatus clears the value of the "product_status" field.
|
||||
func (u *InventoryUpsertOne) ClearProductStatus() *InventoryUpsertOne {
|
||||
return u.Update(func(s *InventoryUpsert) {
|
||||
s.ClearProductStatus()
|
||||
})
|
||||
}
|
||||
|
||||
// SetRelatedStandard sets the "related_standard" field.
|
||||
func (u *InventoryUpsertOne) SetRelatedStandard(v string) *InventoryUpsertOne {
|
||||
return u.Update(func(s *InventoryUpsert) {
|
||||
s.SetRelatedStandard(v)
|
||||
})
|
||||
}
|
||||
|
||||
// UpdateRelatedStandard sets the "related_standard" field to the value that was provided on create.
|
||||
func (u *InventoryUpsertOne) UpdateRelatedStandard() *InventoryUpsertOne {
|
||||
return u.Update(func(s *InventoryUpsert) {
|
||||
s.UpdateRelatedStandard()
|
||||
})
|
||||
}
|
||||
|
||||
// ClearRelatedStandard clears the value of the "related_standard" field.
|
||||
func (u *InventoryUpsertOne) ClearRelatedStandard() *InventoryUpsertOne {
|
||||
return u.Update(func(s *InventoryUpsert) {
|
||||
s.ClearRelatedStandard()
|
||||
})
|
||||
}
|
||||
|
||||
// SetTestRecordNo sets the "test_record_no" field.
|
||||
func (u *InventoryUpsertOne) SetTestRecordNo(v string) *InventoryUpsertOne {
|
||||
return u.Update(func(s *InventoryUpsert) {
|
||||
s.SetTestRecordNo(v)
|
||||
})
|
||||
}
|
||||
|
||||
// UpdateTestRecordNo sets the "test_record_no" field to the value that was provided on create.
|
||||
func (u *InventoryUpsertOne) UpdateTestRecordNo() *InventoryUpsertOne {
|
||||
return u.Update(func(s *InventoryUpsert) {
|
||||
s.UpdateTestRecordNo()
|
||||
})
|
||||
}
|
||||
|
||||
// ClearTestRecordNo clears the value of the "test_record_no" field.
|
||||
func (u *InventoryUpsertOne) ClearTestRecordNo() *InventoryUpsertOne {
|
||||
return u.Update(func(s *InventoryUpsert) {
|
||||
s.ClearTestRecordNo()
|
||||
})
|
||||
}
|
||||
|
||||
// SetRecordedBy sets the "recorded_by" field.
|
||||
func (u *InventoryUpsertOne) SetRecordedBy(v string) *InventoryUpsertOne {
|
||||
return u.Update(func(s *InventoryUpsert) {
|
||||
s.SetRecordedBy(v)
|
||||
})
|
||||
}
|
||||
|
||||
// UpdateRecordedBy sets the "recorded_by" field to the value that was provided on create.
|
||||
func (u *InventoryUpsertOne) UpdateRecordedBy() *InventoryUpsertOne {
|
||||
return u.Update(func(s *InventoryUpsert) {
|
||||
s.UpdateRecordedBy()
|
||||
})
|
||||
}
|
||||
|
||||
// ClearRecordedBy clears the value of the "recorded_by" field.
|
||||
func (u *InventoryUpsertOne) ClearRecordedBy() *InventoryUpsertOne {
|
||||
return u.Update(func(s *InventoryUpsert) {
|
||||
s.ClearRecordedBy()
|
||||
})
|
||||
}
|
||||
|
||||
// SetRecordedAt sets the "recorded_at" field.
|
||||
func (u *InventoryUpsertOne) SetRecordedAt(v int64) *InventoryUpsertOne {
|
||||
return u.Update(func(s *InventoryUpsert) {
|
||||
s.SetRecordedAt(v)
|
||||
})
|
||||
}
|
||||
|
||||
// AddRecordedAt adds v to the "recorded_at" field.
|
||||
func (u *InventoryUpsertOne) AddRecordedAt(v int64) *InventoryUpsertOne {
|
||||
return u.Update(func(s *InventoryUpsert) {
|
||||
s.AddRecordedAt(v)
|
||||
})
|
||||
}
|
||||
|
||||
// UpdateRecordedAt sets the "recorded_at" field to the value that was provided on create.
|
||||
func (u *InventoryUpsertOne) UpdateRecordedAt() *InventoryUpsertOne {
|
||||
return u.Update(func(s *InventoryUpsert) {
|
||||
s.UpdateRecordedAt()
|
||||
})
|
||||
}
|
||||
|
||||
// ClearRecordedAt clears the value of the "recorded_at" field.
|
||||
func (u *InventoryUpsertOne) ClearRecordedAt() *InventoryUpsertOne {
|
||||
return u.Update(func(s *InventoryUpsert) {
|
||||
s.ClearRecordedAt()
|
||||
})
|
||||
}
|
||||
|
||||
// SetOutboundReason sets the "outbound_reason" field.
|
||||
func (u *InventoryUpsertOne) SetOutboundReason(v string) *InventoryUpsertOne {
|
||||
return u.Update(func(s *InventoryUpsert) {
|
||||
s.SetOutboundReason(v)
|
||||
})
|
||||
}
|
||||
|
||||
// UpdateOutboundReason sets the "outbound_reason" field to the value that was provided on create.
|
||||
func (u *InventoryUpsertOne) UpdateOutboundReason() *InventoryUpsertOne {
|
||||
return u.Update(func(s *InventoryUpsert) {
|
||||
s.UpdateOutboundReason()
|
||||
})
|
||||
}
|
||||
|
||||
// ClearOutboundReason clears the value of the "outbound_reason" field.
|
||||
func (u *InventoryUpsertOne) ClearOutboundReason() *InventoryUpsertOne {
|
||||
return u.Update(func(s *InventoryUpsert) {
|
||||
s.ClearOutboundReason()
|
||||
})
|
||||
}
|
||||
|
||||
// SetRemark sets the "remark" field.
|
||||
func (u *InventoryUpsertOne) SetRemark(v string) *InventoryUpsertOne {
|
||||
return u.Update(func(s *InventoryUpsert) {
|
||||
@@ -1660,6 +2300,69 @@ func (u *InventoryUpsertBulk) ClearZoneCode() *InventoryUpsertBulk {
|
||||
})
|
||||
}
|
||||
|
||||
// SetShelfNo sets the "shelf_no" field.
|
||||
func (u *InventoryUpsertBulk) SetShelfNo(v string) *InventoryUpsertBulk {
|
||||
return u.Update(func(s *InventoryUpsert) {
|
||||
s.SetShelfNo(v)
|
||||
})
|
||||
}
|
||||
|
||||
// UpdateShelfNo sets the "shelf_no" field to the value that was provided on create.
|
||||
func (u *InventoryUpsertBulk) UpdateShelfNo() *InventoryUpsertBulk {
|
||||
return u.Update(func(s *InventoryUpsert) {
|
||||
s.UpdateShelfNo()
|
||||
})
|
||||
}
|
||||
|
||||
// ClearShelfNo clears the value of the "shelf_no" field.
|
||||
func (u *InventoryUpsertBulk) ClearShelfNo() *InventoryUpsertBulk {
|
||||
return u.Update(func(s *InventoryUpsert) {
|
||||
s.ClearShelfNo()
|
||||
})
|
||||
}
|
||||
|
||||
// SetLayerNo sets the "layer_no" field.
|
||||
func (u *InventoryUpsertBulk) SetLayerNo(v string) *InventoryUpsertBulk {
|
||||
return u.Update(func(s *InventoryUpsert) {
|
||||
s.SetLayerNo(v)
|
||||
})
|
||||
}
|
||||
|
||||
// UpdateLayerNo sets the "layer_no" field to the value that was provided on create.
|
||||
func (u *InventoryUpsertBulk) UpdateLayerNo() *InventoryUpsertBulk {
|
||||
return u.Update(func(s *InventoryUpsert) {
|
||||
s.UpdateLayerNo()
|
||||
})
|
||||
}
|
||||
|
||||
// ClearLayerNo clears the value of the "layer_no" field.
|
||||
func (u *InventoryUpsertBulk) ClearLayerNo() *InventoryUpsertBulk {
|
||||
return u.Update(func(s *InventoryUpsert) {
|
||||
s.ClearLayerNo()
|
||||
})
|
||||
}
|
||||
|
||||
// SetPositionNo sets the "position_no" field.
|
||||
func (u *InventoryUpsertBulk) SetPositionNo(v string) *InventoryUpsertBulk {
|
||||
return u.Update(func(s *InventoryUpsert) {
|
||||
s.SetPositionNo(v)
|
||||
})
|
||||
}
|
||||
|
||||
// UpdatePositionNo sets the "position_no" field to the value that was provided on create.
|
||||
func (u *InventoryUpsertBulk) UpdatePositionNo() *InventoryUpsertBulk {
|
||||
return u.Update(func(s *InventoryUpsert) {
|
||||
s.UpdatePositionNo()
|
||||
})
|
||||
}
|
||||
|
||||
// ClearPositionNo clears the value of the "position_no" field.
|
||||
func (u *InventoryUpsertBulk) ClearPositionNo() *InventoryUpsertBulk {
|
||||
return u.Update(func(s *InventoryUpsert) {
|
||||
s.ClearPositionNo()
|
||||
})
|
||||
}
|
||||
|
||||
// SetStatus sets the "status" field.
|
||||
func (u *InventoryUpsertBulk) SetStatus(v string) *InventoryUpsertBulk {
|
||||
return u.Update(func(s *InventoryUpsert) {
|
||||
@@ -1765,6 +2468,181 @@ func (u *InventoryUpsertBulk) UpdateCompletedProcess() *InventoryUpsertBulk {
|
||||
})
|
||||
}
|
||||
|
||||
// SetOwnershipType sets the "ownership_type" field.
|
||||
func (u *InventoryUpsertBulk) SetOwnershipType(v string) *InventoryUpsertBulk {
|
||||
return u.Update(func(s *InventoryUpsert) {
|
||||
s.SetOwnershipType(v)
|
||||
})
|
||||
}
|
||||
|
||||
// UpdateOwnershipType sets the "ownership_type" field to the value that was provided on create.
|
||||
func (u *InventoryUpsertBulk) UpdateOwnershipType() *InventoryUpsertBulk {
|
||||
return u.Update(func(s *InventoryUpsert) {
|
||||
s.UpdateOwnershipType()
|
||||
})
|
||||
}
|
||||
|
||||
// ClearOwnershipType clears the value of the "ownership_type" field.
|
||||
func (u *InventoryUpsertBulk) ClearOwnershipType() *InventoryUpsertBulk {
|
||||
return u.Update(func(s *InventoryUpsert) {
|
||||
s.ClearOwnershipType()
|
||||
})
|
||||
}
|
||||
|
||||
// SetOwnershipNo sets the "ownership_no" field.
|
||||
func (u *InventoryUpsertBulk) SetOwnershipNo(v string) *InventoryUpsertBulk {
|
||||
return u.Update(func(s *InventoryUpsert) {
|
||||
s.SetOwnershipNo(v)
|
||||
})
|
||||
}
|
||||
|
||||
// UpdateOwnershipNo sets the "ownership_no" field to the value that was provided on create.
|
||||
func (u *InventoryUpsertBulk) UpdateOwnershipNo() *InventoryUpsertBulk {
|
||||
return u.Update(func(s *InventoryUpsert) {
|
||||
s.UpdateOwnershipNo()
|
||||
})
|
||||
}
|
||||
|
||||
// ClearOwnershipNo clears the value of the "ownership_no" field.
|
||||
func (u *InventoryUpsertBulk) ClearOwnershipNo() *InventoryUpsertBulk {
|
||||
return u.Update(func(s *InventoryUpsert) {
|
||||
s.ClearOwnershipNo()
|
||||
})
|
||||
}
|
||||
|
||||
// SetProductStatus sets the "product_status" field.
|
||||
func (u *InventoryUpsertBulk) SetProductStatus(v string) *InventoryUpsertBulk {
|
||||
return u.Update(func(s *InventoryUpsert) {
|
||||
s.SetProductStatus(v)
|
||||
})
|
||||
}
|
||||
|
||||
// UpdateProductStatus sets the "product_status" field to the value that was provided on create.
|
||||
func (u *InventoryUpsertBulk) UpdateProductStatus() *InventoryUpsertBulk {
|
||||
return u.Update(func(s *InventoryUpsert) {
|
||||
s.UpdateProductStatus()
|
||||
})
|
||||
}
|
||||
|
||||
// ClearProductStatus clears the value of the "product_status" field.
|
||||
func (u *InventoryUpsertBulk) ClearProductStatus() *InventoryUpsertBulk {
|
||||
return u.Update(func(s *InventoryUpsert) {
|
||||
s.ClearProductStatus()
|
||||
})
|
||||
}
|
||||
|
||||
// SetRelatedStandard sets the "related_standard" field.
|
||||
func (u *InventoryUpsertBulk) SetRelatedStandard(v string) *InventoryUpsertBulk {
|
||||
return u.Update(func(s *InventoryUpsert) {
|
||||
s.SetRelatedStandard(v)
|
||||
})
|
||||
}
|
||||
|
||||
// UpdateRelatedStandard sets the "related_standard" field to the value that was provided on create.
|
||||
func (u *InventoryUpsertBulk) UpdateRelatedStandard() *InventoryUpsertBulk {
|
||||
return u.Update(func(s *InventoryUpsert) {
|
||||
s.UpdateRelatedStandard()
|
||||
})
|
||||
}
|
||||
|
||||
// ClearRelatedStandard clears the value of the "related_standard" field.
|
||||
func (u *InventoryUpsertBulk) ClearRelatedStandard() *InventoryUpsertBulk {
|
||||
return u.Update(func(s *InventoryUpsert) {
|
||||
s.ClearRelatedStandard()
|
||||
})
|
||||
}
|
||||
|
||||
// SetTestRecordNo sets the "test_record_no" field.
|
||||
func (u *InventoryUpsertBulk) SetTestRecordNo(v string) *InventoryUpsertBulk {
|
||||
return u.Update(func(s *InventoryUpsert) {
|
||||
s.SetTestRecordNo(v)
|
||||
})
|
||||
}
|
||||
|
||||
// UpdateTestRecordNo sets the "test_record_no" field to the value that was provided on create.
|
||||
func (u *InventoryUpsertBulk) UpdateTestRecordNo() *InventoryUpsertBulk {
|
||||
return u.Update(func(s *InventoryUpsert) {
|
||||
s.UpdateTestRecordNo()
|
||||
})
|
||||
}
|
||||
|
||||
// ClearTestRecordNo clears the value of the "test_record_no" field.
|
||||
func (u *InventoryUpsertBulk) ClearTestRecordNo() *InventoryUpsertBulk {
|
||||
return u.Update(func(s *InventoryUpsert) {
|
||||
s.ClearTestRecordNo()
|
||||
})
|
||||
}
|
||||
|
||||
// SetRecordedBy sets the "recorded_by" field.
|
||||
func (u *InventoryUpsertBulk) SetRecordedBy(v string) *InventoryUpsertBulk {
|
||||
return u.Update(func(s *InventoryUpsert) {
|
||||
s.SetRecordedBy(v)
|
||||
})
|
||||
}
|
||||
|
||||
// UpdateRecordedBy sets the "recorded_by" field to the value that was provided on create.
|
||||
func (u *InventoryUpsertBulk) UpdateRecordedBy() *InventoryUpsertBulk {
|
||||
return u.Update(func(s *InventoryUpsert) {
|
||||
s.UpdateRecordedBy()
|
||||
})
|
||||
}
|
||||
|
||||
// ClearRecordedBy clears the value of the "recorded_by" field.
|
||||
func (u *InventoryUpsertBulk) ClearRecordedBy() *InventoryUpsertBulk {
|
||||
return u.Update(func(s *InventoryUpsert) {
|
||||
s.ClearRecordedBy()
|
||||
})
|
||||
}
|
||||
|
||||
// SetRecordedAt sets the "recorded_at" field.
|
||||
func (u *InventoryUpsertBulk) SetRecordedAt(v int64) *InventoryUpsertBulk {
|
||||
return u.Update(func(s *InventoryUpsert) {
|
||||
s.SetRecordedAt(v)
|
||||
})
|
||||
}
|
||||
|
||||
// AddRecordedAt adds v to the "recorded_at" field.
|
||||
func (u *InventoryUpsertBulk) AddRecordedAt(v int64) *InventoryUpsertBulk {
|
||||
return u.Update(func(s *InventoryUpsert) {
|
||||
s.AddRecordedAt(v)
|
||||
})
|
||||
}
|
||||
|
||||
// UpdateRecordedAt sets the "recorded_at" field to the value that was provided on create.
|
||||
func (u *InventoryUpsertBulk) UpdateRecordedAt() *InventoryUpsertBulk {
|
||||
return u.Update(func(s *InventoryUpsert) {
|
||||
s.UpdateRecordedAt()
|
||||
})
|
||||
}
|
||||
|
||||
// ClearRecordedAt clears the value of the "recorded_at" field.
|
||||
func (u *InventoryUpsertBulk) ClearRecordedAt() *InventoryUpsertBulk {
|
||||
return u.Update(func(s *InventoryUpsert) {
|
||||
s.ClearRecordedAt()
|
||||
})
|
||||
}
|
||||
|
||||
// SetOutboundReason sets the "outbound_reason" field.
|
||||
func (u *InventoryUpsertBulk) SetOutboundReason(v string) *InventoryUpsertBulk {
|
||||
return u.Update(func(s *InventoryUpsert) {
|
||||
s.SetOutboundReason(v)
|
||||
})
|
||||
}
|
||||
|
||||
// UpdateOutboundReason sets the "outbound_reason" field to the value that was provided on create.
|
||||
func (u *InventoryUpsertBulk) UpdateOutboundReason() *InventoryUpsertBulk {
|
||||
return u.Update(func(s *InventoryUpsert) {
|
||||
s.UpdateOutboundReason()
|
||||
})
|
||||
}
|
||||
|
||||
// ClearOutboundReason clears the value of the "outbound_reason" field.
|
||||
func (u *InventoryUpsertBulk) ClearOutboundReason() *InventoryUpsertBulk {
|
||||
return u.Update(func(s *InventoryUpsert) {
|
||||
s.ClearOutboundReason()
|
||||
})
|
||||
}
|
||||
|
||||
// SetRemark sets the "remark" field.
|
||||
func (u *InventoryUpsertBulk) SetRemark(v string) *InventoryUpsertBulk {
|
||||
return u.Update(func(s *InventoryUpsert) {
|
||||
|
||||
Reference in New Issue
Block a user