liujiandao
2023-09-23 79eca4ef507f418b88a0817f43a9ea25750a818a
models/material.go
@@ -475,3 +475,24 @@
   }
   return result.Max, nil
}
type ResponseDisuseList struct {
   Id             int                      `json:"id" gorm:"column:id;primary_key;AUTO_INCREMENT"`
   Number         string                   `json:"number" gorm:"type:varchar(255)"`                                 //单号
   SourceNumber   string                   `json:"sourceNumber" gorm:"type:varchar(255)"`                           //源单号
   Status         constvar.OperationStatus `json:"status" gorm:"type:int(11);not null;comment:状态"`                  //状态
   FromLocationID int                      `json:"fromLocationId"   gorm:"type:int;not null;comment:源位置id"`         //源位置id
   FromLocation   Location                 `json:"fromLocation"     gorm:"foreignKey:FromLocationID;references:Id"` //源位置
   ToLocation     Location                 `json:"toLocation"      gorm:"foreignKey:ToLocationID;references:Id"`    //目标位置
   ToLocationID   int                      `json:"toLocationId"    gorm:"type:int;not null;comment:目标位置id"`         //目标位置id
   OperationDate  string                   `json:"operationDate" gorm:"type:varchar(31);comment:安排日期"`
   ContacterID    int                      `json:"contacterID" gorm:"type:int;comment:联系人ID"`
   ContacterName  string                   `json:"contacterName" gorm:"type:varchar(63);comment:联系人姓名"`
   CompanyID      int                      `json:"companyID" gorm:"type:int;comment:公司ID-客户"`
   CompanyName    string                   `json:"companyName" gorm:"type:varchar(127);comment:公司名称-客户"`
   Comment        string                   `json:"comment" gorm:"type:text;comment:备注"`
   ProductId      string                   `json:"productId" gorm:"type:varchar(191);not null;comment:产品id"`   //产品id
   ProductName    string                   `json:"productName" gorm:"type:varchar(255);not null;comment:产品名称"` //产品名称
   Amount         decimal.Decimal          `json:"amount" gorm:"type:decimal(20,2);not null;comment:数量"`       //数量
   Unit           string                   `json:"unit" gorm:"type:varchar(31);comment:单位"`
}