feat(mes): 添加定时同步可生产数量到WMS及BOM项相关标准字段

- 在main.go中添加定时任务每10分钟同步可生产数量到WMS系统
- 为BomItem实体添加relatedStandard字段及相关CRUD方法
- 为InspectionRecord实体添加reportNo、materialCode、materialName等字段
- 更新ent schema确保新字段的验证和默认值设置
- 添加必要的数据库迁移和字段映射逻辑
This commit is contained in:
SunYF
2026-09-17 12:49:07 +08:00
parent b4b274301d
commit 1cc93795ce
191 changed files with 24504 additions and 1250 deletions
+592
View File
@@ -219,6 +219,66 @@ func (_u *InventoryUpdate) ClearZoneCode() *InventoryUpdate {
return _u
}
// SetShelfNo sets the "shelf_no" field.
func (_u *InventoryUpdate) SetShelfNo(v string) *InventoryUpdate {
_u.mutation.SetShelfNo(v)
return _u
}
// SetNillableShelfNo sets the "shelf_no" field if the given value is not nil.
func (_u *InventoryUpdate) SetNillableShelfNo(v *string) *InventoryUpdate {
if v != nil {
_u.SetShelfNo(*v)
}
return _u
}
// ClearShelfNo clears the value of the "shelf_no" field.
func (_u *InventoryUpdate) ClearShelfNo() *InventoryUpdate {
_u.mutation.ClearShelfNo()
return _u
}
// SetLayerNo sets the "layer_no" field.
func (_u *InventoryUpdate) SetLayerNo(v string) *InventoryUpdate {
_u.mutation.SetLayerNo(v)
return _u
}
// SetNillableLayerNo sets the "layer_no" field if the given value is not nil.
func (_u *InventoryUpdate) SetNillableLayerNo(v *string) *InventoryUpdate {
if v != nil {
_u.SetLayerNo(*v)
}
return _u
}
// ClearLayerNo clears the value of the "layer_no" field.
func (_u *InventoryUpdate) ClearLayerNo() *InventoryUpdate {
_u.mutation.ClearLayerNo()
return _u
}
// SetPositionNo sets the "position_no" field.
func (_u *InventoryUpdate) SetPositionNo(v string) *InventoryUpdate {
_u.mutation.SetPositionNo(v)
return _u
}
// SetNillablePositionNo sets the "position_no" field if the given value is not nil.
func (_u *InventoryUpdate) SetNillablePositionNo(v *string) *InventoryUpdate {
if v != nil {
_u.SetPositionNo(*v)
}
return _u
}
// ClearPositionNo clears the value of the "position_no" field.
func (_u *InventoryUpdate) ClearPositionNo() *InventoryUpdate {
_u.mutation.ClearPositionNo()
return _u
}
// SetStatus sets the "status" field.
func (_u *InventoryUpdate) SetStatus(v string) *InventoryUpdate {
_u.mutation.SetStatus(v)
@@ -321,6 +381,173 @@ func (_u *InventoryUpdate) SetNillableCompletedProcess(v *string) *InventoryUpda
return _u
}
// SetOwnershipType sets the "ownership_type" field.
func (_u *InventoryUpdate) SetOwnershipType(v string) *InventoryUpdate {
_u.mutation.SetOwnershipType(v)
return _u
}
// SetNillableOwnershipType sets the "ownership_type" field if the given value is not nil.
func (_u *InventoryUpdate) SetNillableOwnershipType(v *string) *InventoryUpdate {
if v != nil {
_u.SetOwnershipType(*v)
}
return _u
}
// ClearOwnershipType clears the value of the "ownership_type" field.
func (_u *InventoryUpdate) ClearOwnershipType() *InventoryUpdate {
_u.mutation.ClearOwnershipType()
return _u
}
// SetOwnershipNo sets the "ownership_no" field.
func (_u *InventoryUpdate) SetOwnershipNo(v string) *InventoryUpdate {
_u.mutation.SetOwnershipNo(v)
return _u
}
// SetNillableOwnershipNo sets the "ownership_no" field if the given value is not nil.
func (_u *InventoryUpdate) SetNillableOwnershipNo(v *string) *InventoryUpdate {
if v != nil {
_u.SetOwnershipNo(*v)
}
return _u
}
// ClearOwnershipNo clears the value of the "ownership_no" field.
func (_u *InventoryUpdate) ClearOwnershipNo() *InventoryUpdate {
_u.mutation.ClearOwnershipNo()
return _u
}
// SetProductStatus sets the "product_status" field.
func (_u *InventoryUpdate) SetProductStatus(v string) *InventoryUpdate {
_u.mutation.SetProductStatus(v)
return _u
}
// SetNillableProductStatus sets the "product_status" field if the given value is not nil.
func (_u *InventoryUpdate) SetNillableProductStatus(v *string) *InventoryUpdate {
if v != nil {
_u.SetProductStatus(*v)
}
return _u
}
// ClearProductStatus clears the value of the "product_status" field.
func (_u *InventoryUpdate) ClearProductStatus() *InventoryUpdate {
_u.mutation.ClearProductStatus()
return _u
}
// SetRelatedStandard sets the "related_standard" field.
func (_u *InventoryUpdate) SetRelatedStandard(v string) *InventoryUpdate {
_u.mutation.SetRelatedStandard(v)
return _u
}
// SetNillableRelatedStandard sets the "related_standard" field if the given value is not nil.
func (_u *InventoryUpdate) SetNillableRelatedStandard(v *string) *InventoryUpdate {
if v != nil {
_u.SetRelatedStandard(*v)
}
return _u
}
// ClearRelatedStandard clears the value of the "related_standard" field.
func (_u *InventoryUpdate) ClearRelatedStandard() *InventoryUpdate {
_u.mutation.ClearRelatedStandard()
return _u
}
// SetTestRecordNo sets the "test_record_no" field.
func (_u *InventoryUpdate) SetTestRecordNo(v string) *InventoryUpdate {
_u.mutation.SetTestRecordNo(v)
return _u
}
// SetNillableTestRecordNo sets the "test_record_no" field if the given value is not nil.
func (_u *InventoryUpdate) SetNillableTestRecordNo(v *string) *InventoryUpdate {
if v != nil {
_u.SetTestRecordNo(*v)
}
return _u
}
// ClearTestRecordNo clears the value of the "test_record_no" field.
func (_u *InventoryUpdate) ClearTestRecordNo() *InventoryUpdate {
_u.mutation.ClearTestRecordNo()
return _u
}
// SetRecordedBy sets the "recorded_by" field.
func (_u *InventoryUpdate) SetRecordedBy(v string) *InventoryUpdate {
_u.mutation.SetRecordedBy(v)
return _u
}
// SetNillableRecordedBy sets the "recorded_by" field if the given value is not nil.
func (_u *InventoryUpdate) SetNillableRecordedBy(v *string) *InventoryUpdate {
if v != nil {
_u.SetRecordedBy(*v)
}
return _u
}
// ClearRecordedBy clears the value of the "recorded_by" field.
func (_u *InventoryUpdate) ClearRecordedBy() *InventoryUpdate {
_u.mutation.ClearRecordedBy()
return _u
}
// SetRecordedAt sets the "recorded_at" field.
func (_u *InventoryUpdate) SetRecordedAt(v int64) *InventoryUpdate {
_u.mutation.ResetRecordedAt()
_u.mutation.SetRecordedAt(v)
return _u
}
// SetNillableRecordedAt sets the "recorded_at" field if the given value is not nil.
func (_u *InventoryUpdate) SetNillableRecordedAt(v *int64) *InventoryUpdate {
if v != nil {
_u.SetRecordedAt(*v)
}
return _u
}
// AddRecordedAt adds value to the "recorded_at" field.
func (_u *InventoryUpdate) AddRecordedAt(v int64) *InventoryUpdate {
_u.mutation.AddRecordedAt(v)
return _u
}
// ClearRecordedAt clears the value of the "recorded_at" field.
func (_u *InventoryUpdate) ClearRecordedAt() *InventoryUpdate {
_u.mutation.ClearRecordedAt()
return _u
}
// SetOutboundReason sets the "outbound_reason" field.
func (_u *InventoryUpdate) SetOutboundReason(v string) *InventoryUpdate {
_u.mutation.SetOutboundReason(v)
return _u
}
// SetNillableOutboundReason sets the "outbound_reason" field if the given value is not nil.
func (_u *InventoryUpdate) SetNillableOutboundReason(v *string) *InventoryUpdate {
if v != nil {
_u.SetOutboundReason(*v)
}
return _u
}
// ClearOutboundReason clears the value of the "outbound_reason" field.
func (_u *InventoryUpdate) ClearOutboundReason() *InventoryUpdate {
_u.mutation.ClearOutboundReason()
return _u
}
// SetRemark sets the "remark" field.
func (_u *InventoryUpdate) SetRemark(v string) *InventoryUpdate {
_u.mutation.SetRemark(v)
@@ -496,6 +723,24 @@ func (_u *InventoryUpdate) sqlSave(ctx context.Context) (_node int, err error) {
if _u.mutation.ZoneCodeCleared() {
_spec.ClearField(inventory.FieldZoneCode, field.TypeString)
}
if value, ok := _u.mutation.ShelfNo(); ok {
_spec.SetField(inventory.FieldShelfNo, field.TypeString, value)
}
if _u.mutation.ShelfNoCleared() {
_spec.ClearField(inventory.FieldShelfNo, field.TypeString)
}
if value, ok := _u.mutation.LayerNo(); ok {
_spec.SetField(inventory.FieldLayerNo, field.TypeString, value)
}
if _u.mutation.LayerNoCleared() {
_spec.ClearField(inventory.FieldLayerNo, field.TypeString)
}
if value, ok := _u.mutation.PositionNo(); ok {
_spec.SetField(inventory.FieldPositionNo, field.TypeString, value)
}
if _u.mutation.PositionNoCleared() {
_spec.ClearField(inventory.FieldPositionNo, field.TypeString)
}
if value, ok := _u.mutation.Status(); ok {
_spec.SetField(inventory.FieldStatus, field.TypeString, value)
}
@@ -523,6 +768,57 @@ func (_u *InventoryUpdate) sqlSave(ctx context.Context) (_node int, err error) {
if value, ok := _u.mutation.CompletedProcess(); ok {
_spec.SetField(inventory.FieldCompletedProcess, field.TypeString, value)
}
if value, ok := _u.mutation.OwnershipType(); ok {
_spec.SetField(inventory.FieldOwnershipType, field.TypeString, value)
}
if _u.mutation.OwnershipTypeCleared() {
_spec.ClearField(inventory.FieldOwnershipType, field.TypeString)
}
if value, ok := _u.mutation.OwnershipNo(); ok {
_spec.SetField(inventory.FieldOwnershipNo, field.TypeString, value)
}
if _u.mutation.OwnershipNoCleared() {
_spec.ClearField(inventory.FieldOwnershipNo, field.TypeString)
}
if value, ok := _u.mutation.ProductStatus(); ok {
_spec.SetField(inventory.FieldProductStatus, field.TypeString, value)
}
if _u.mutation.ProductStatusCleared() {
_spec.ClearField(inventory.FieldProductStatus, field.TypeString)
}
if value, ok := _u.mutation.RelatedStandard(); ok {
_spec.SetField(inventory.FieldRelatedStandard, field.TypeString, value)
}
if _u.mutation.RelatedStandardCleared() {
_spec.ClearField(inventory.FieldRelatedStandard, field.TypeString)
}
if value, ok := _u.mutation.TestRecordNo(); ok {
_spec.SetField(inventory.FieldTestRecordNo, field.TypeString, value)
}
if _u.mutation.TestRecordNoCleared() {
_spec.ClearField(inventory.FieldTestRecordNo, field.TypeString)
}
if value, ok := _u.mutation.RecordedBy(); ok {
_spec.SetField(inventory.FieldRecordedBy, field.TypeString, value)
}
if _u.mutation.RecordedByCleared() {
_spec.ClearField(inventory.FieldRecordedBy, field.TypeString)
}
if value, ok := _u.mutation.RecordedAt(); ok {
_spec.SetField(inventory.FieldRecordedAt, field.TypeInt64, value)
}
if value, ok := _u.mutation.AddedRecordedAt(); ok {
_spec.AddField(inventory.FieldRecordedAt, field.TypeInt64, value)
}
if _u.mutation.RecordedAtCleared() {
_spec.ClearField(inventory.FieldRecordedAt, field.TypeInt64)
}
if value, ok := _u.mutation.OutboundReason(); ok {
_spec.SetField(inventory.FieldOutboundReason, field.TypeString, value)
}
if _u.mutation.OutboundReasonCleared() {
_spec.ClearField(inventory.FieldOutboundReason, field.TypeString)
}
if value, ok := _u.mutation.Remark(); ok {
_spec.SetField(inventory.FieldRemark, field.TypeString, value)
}
@@ -753,6 +1049,66 @@ func (_u *InventoryUpdateOne) ClearZoneCode() *InventoryUpdateOne {
return _u
}
// SetShelfNo sets the "shelf_no" field.
func (_u *InventoryUpdateOne) SetShelfNo(v string) *InventoryUpdateOne {
_u.mutation.SetShelfNo(v)
return _u
}
// SetNillableShelfNo sets the "shelf_no" field if the given value is not nil.
func (_u *InventoryUpdateOne) SetNillableShelfNo(v *string) *InventoryUpdateOne {
if v != nil {
_u.SetShelfNo(*v)
}
return _u
}
// ClearShelfNo clears the value of the "shelf_no" field.
func (_u *InventoryUpdateOne) ClearShelfNo() *InventoryUpdateOne {
_u.mutation.ClearShelfNo()
return _u
}
// SetLayerNo sets the "layer_no" field.
func (_u *InventoryUpdateOne) SetLayerNo(v string) *InventoryUpdateOne {
_u.mutation.SetLayerNo(v)
return _u
}
// SetNillableLayerNo sets the "layer_no" field if the given value is not nil.
func (_u *InventoryUpdateOne) SetNillableLayerNo(v *string) *InventoryUpdateOne {
if v != nil {
_u.SetLayerNo(*v)
}
return _u
}
// ClearLayerNo clears the value of the "layer_no" field.
func (_u *InventoryUpdateOne) ClearLayerNo() *InventoryUpdateOne {
_u.mutation.ClearLayerNo()
return _u
}
// SetPositionNo sets the "position_no" field.
func (_u *InventoryUpdateOne) SetPositionNo(v string) *InventoryUpdateOne {
_u.mutation.SetPositionNo(v)
return _u
}
// SetNillablePositionNo sets the "position_no" field if the given value is not nil.
func (_u *InventoryUpdateOne) SetNillablePositionNo(v *string) *InventoryUpdateOne {
if v != nil {
_u.SetPositionNo(*v)
}
return _u
}
// ClearPositionNo clears the value of the "position_no" field.
func (_u *InventoryUpdateOne) ClearPositionNo() *InventoryUpdateOne {
_u.mutation.ClearPositionNo()
return _u
}
// SetStatus sets the "status" field.
func (_u *InventoryUpdateOne) SetStatus(v string) *InventoryUpdateOne {
_u.mutation.SetStatus(v)
@@ -855,6 +1211,173 @@ func (_u *InventoryUpdateOne) SetNillableCompletedProcess(v *string) *InventoryU
return _u
}
// SetOwnershipType sets the "ownership_type" field.
func (_u *InventoryUpdateOne) SetOwnershipType(v string) *InventoryUpdateOne {
_u.mutation.SetOwnershipType(v)
return _u
}
// SetNillableOwnershipType sets the "ownership_type" field if the given value is not nil.
func (_u *InventoryUpdateOne) SetNillableOwnershipType(v *string) *InventoryUpdateOne {
if v != nil {
_u.SetOwnershipType(*v)
}
return _u
}
// ClearOwnershipType clears the value of the "ownership_type" field.
func (_u *InventoryUpdateOne) ClearOwnershipType() *InventoryUpdateOne {
_u.mutation.ClearOwnershipType()
return _u
}
// SetOwnershipNo sets the "ownership_no" field.
func (_u *InventoryUpdateOne) SetOwnershipNo(v string) *InventoryUpdateOne {
_u.mutation.SetOwnershipNo(v)
return _u
}
// SetNillableOwnershipNo sets the "ownership_no" field if the given value is not nil.
func (_u *InventoryUpdateOne) SetNillableOwnershipNo(v *string) *InventoryUpdateOne {
if v != nil {
_u.SetOwnershipNo(*v)
}
return _u
}
// ClearOwnershipNo clears the value of the "ownership_no" field.
func (_u *InventoryUpdateOne) ClearOwnershipNo() *InventoryUpdateOne {
_u.mutation.ClearOwnershipNo()
return _u
}
// SetProductStatus sets the "product_status" field.
func (_u *InventoryUpdateOne) SetProductStatus(v string) *InventoryUpdateOne {
_u.mutation.SetProductStatus(v)
return _u
}
// SetNillableProductStatus sets the "product_status" field if the given value is not nil.
func (_u *InventoryUpdateOne) SetNillableProductStatus(v *string) *InventoryUpdateOne {
if v != nil {
_u.SetProductStatus(*v)
}
return _u
}
// ClearProductStatus clears the value of the "product_status" field.
func (_u *InventoryUpdateOne) ClearProductStatus() *InventoryUpdateOne {
_u.mutation.ClearProductStatus()
return _u
}
// SetRelatedStandard sets the "related_standard" field.
func (_u *InventoryUpdateOne) SetRelatedStandard(v string) *InventoryUpdateOne {
_u.mutation.SetRelatedStandard(v)
return _u
}
// SetNillableRelatedStandard sets the "related_standard" field if the given value is not nil.
func (_u *InventoryUpdateOne) SetNillableRelatedStandard(v *string) *InventoryUpdateOne {
if v != nil {
_u.SetRelatedStandard(*v)
}
return _u
}
// ClearRelatedStandard clears the value of the "related_standard" field.
func (_u *InventoryUpdateOne) ClearRelatedStandard() *InventoryUpdateOne {
_u.mutation.ClearRelatedStandard()
return _u
}
// SetTestRecordNo sets the "test_record_no" field.
func (_u *InventoryUpdateOne) SetTestRecordNo(v string) *InventoryUpdateOne {
_u.mutation.SetTestRecordNo(v)
return _u
}
// SetNillableTestRecordNo sets the "test_record_no" field if the given value is not nil.
func (_u *InventoryUpdateOne) SetNillableTestRecordNo(v *string) *InventoryUpdateOne {
if v != nil {
_u.SetTestRecordNo(*v)
}
return _u
}
// ClearTestRecordNo clears the value of the "test_record_no" field.
func (_u *InventoryUpdateOne) ClearTestRecordNo() *InventoryUpdateOne {
_u.mutation.ClearTestRecordNo()
return _u
}
// SetRecordedBy sets the "recorded_by" field.
func (_u *InventoryUpdateOne) SetRecordedBy(v string) *InventoryUpdateOne {
_u.mutation.SetRecordedBy(v)
return _u
}
// SetNillableRecordedBy sets the "recorded_by" field if the given value is not nil.
func (_u *InventoryUpdateOne) SetNillableRecordedBy(v *string) *InventoryUpdateOne {
if v != nil {
_u.SetRecordedBy(*v)
}
return _u
}
// ClearRecordedBy clears the value of the "recorded_by" field.
func (_u *InventoryUpdateOne) ClearRecordedBy() *InventoryUpdateOne {
_u.mutation.ClearRecordedBy()
return _u
}
// SetRecordedAt sets the "recorded_at" field.
func (_u *InventoryUpdateOne) SetRecordedAt(v int64) *InventoryUpdateOne {
_u.mutation.ResetRecordedAt()
_u.mutation.SetRecordedAt(v)
return _u
}
// SetNillableRecordedAt sets the "recorded_at" field if the given value is not nil.
func (_u *InventoryUpdateOne) SetNillableRecordedAt(v *int64) *InventoryUpdateOne {
if v != nil {
_u.SetRecordedAt(*v)
}
return _u
}
// AddRecordedAt adds value to the "recorded_at" field.
func (_u *InventoryUpdateOne) AddRecordedAt(v int64) *InventoryUpdateOne {
_u.mutation.AddRecordedAt(v)
return _u
}
// ClearRecordedAt clears the value of the "recorded_at" field.
func (_u *InventoryUpdateOne) ClearRecordedAt() *InventoryUpdateOne {
_u.mutation.ClearRecordedAt()
return _u
}
// SetOutboundReason sets the "outbound_reason" field.
func (_u *InventoryUpdateOne) SetOutboundReason(v string) *InventoryUpdateOne {
_u.mutation.SetOutboundReason(v)
return _u
}
// SetNillableOutboundReason sets the "outbound_reason" field if the given value is not nil.
func (_u *InventoryUpdateOne) SetNillableOutboundReason(v *string) *InventoryUpdateOne {
if v != nil {
_u.SetOutboundReason(*v)
}
return _u
}
// ClearOutboundReason clears the value of the "outbound_reason" field.
func (_u *InventoryUpdateOne) ClearOutboundReason() *InventoryUpdateOne {
_u.mutation.ClearOutboundReason()
return _u
}
// SetRemark sets the "remark" field.
func (_u *InventoryUpdateOne) SetRemark(v string) *InventoryUpdateOne {
_u.mutation.SetRemark(v)
@@ -1060,6 +1583,24 @@ func (_u *InventoryUpdateOne) sqlSave(ctx context.Context) (_node *Inventory, er
if _u.mutation.ZoneCodeCleared() {
_spec.ClearField(inventory.FieldZoneCode, field.TypeString)
}
if value, ok := _u.mutation.ShelfNo(); ok {
_spec.SetField(inventory.FieldShelfNo, field.TypeString, value)
}
if _u.mutation.ShelfNoCleared() {
_spec.ClearField(inventory.FieldShelfNo, field.TypeString)
}
if value, ok := _u.mutation.LayerNo(); ok {
_spec.SetField(inventory.FieldLayerNo, field.TypeString, value)
}
if _u.mutation.LayerNoCleared() {
_spec.ClearField(inventory.FieldLayerNo, field.TypeString)
}
if value, ok := _u.mutation.PositionNo(); ok {
_spec.SetField(inventory.FieldPositionNo, field.TypeString, value)
}
if _u.mutation.PositionNoCleared() {
_spec.ClearField(inventory.FieldPositionNo, field.TypeString)
}
if value, ok := _u.mutation.Status(); ok {
_spec.SetField(inventory.FieldStatus, field.TypeString, value)
}
@@ -1087,6 +1628,57 @@ func (_u *InventoryUpdateOne) sqlSave(ctx context.Context) (_node *Inventory, er
if value, ok := _u.mutation.CompletedProcess(); ok {
_spec.SetField(inventory.FieldCompletedProcess, field.TypeString, value)
}
if value, ok := _u.mutation.OwnershipType(); ok {
_spec.SetField(inventory.FieldOwnershipType, field.TypeString, value)
}
if _u.mutation.OwnershipTypeCleared() {
_spec.ClearField(inventory.FieldOwnershipType, field.TypeString)
}
if value, ok := _u.mutation.OwnershipNo(); ok {
_spec.SetField(inventory.FieldOwnershipNo, field.TypeString, value)
}
if _u.mutation.OwnershipNoCleared() {
_spec.ClearField(inventory.FieldOwnershipNo, field.TypeString)
}
if value, ok := _u.mutation.ProductStatus(); ok {
_spec.SetField(inventory.FieldProductStatus, field.TypeString, value)
}
if _u.mutation.ProductStatusCleared() {
_spec.ClearField(inventory.FieldProductStatus, field.TypeString)
}
if value, ok := _u.mutation.RelatedStandard(); ok {
_spec.SetField(inventory.FieldRelatedStandard, field.TypeString, value)
}
if _u.mutation.RelatedStandardCleared() {
_spec.ClearField(inventory.FieldRelatedStandard, field.TypeString)
}
if value, ok := _u.mutation.TestRecordNo(); ok {
_spec.SetField(inventory.FieldTestRecordNo, field.TypeString, value)
}
if _u.mutation.TestRecordNoCleared() {
_spec.ClearField(inventory.FieldTestRecordNo, field.TypeString)
}
if value, ok := _u.mutation.RecordedBy(); ok {
_spec.SetField(inventory.FieldRecordedBy, field.TypeString, value)
}
if _u.mutation.RecordedByCleared() {
_spec.ClearField(inventory.FieldRecordedBy, field.TypeString)
}
if value, ok := _u.mutation.RecordedAt(); ok {
_spec.SetField(inventory.FieldRecordedAt, field.TypeInt64, value)
}
if value, ok := _u.mutation.AddedRecordedAt(); ok {
_spec.AddField(inventory.FieldRecordedAt, field.TypeInt64, value)
}
if _u.mutation.RecordedAtCleared() {
_spec.ClearField(inventory.FieldRecordedAt, field.TypeInt64)
}
if value, ok := _u.mutation.OutboundReason(); ok {
_spec.SetField(inventory.FieldOutboundReason, field.TypeString, value)
}
if _u.mutation.OutboundReasonCleared() {
_spec.ClearField(inventory.FieldOutboundReason, field.TypeString)
}
if value, ok := _u.mutation.Remark(); ok {
_spec.SetField(inventory.FieldRemark, field.TypeString, value)
}