wanjianli
2023-09-18 690dd891f8ee47b6036eb87c239275490ee02b7f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package request
 
import (
    "google.golang.org/genproto/googleapis/type/decimal"
    "wms/constvar"
    "wms/extend/util"
)
 
type AddOperation struct {
    Id              int                      `json:"id" gorm:"column:id;primary_key;AUTO_INCREMENT"`
    Number          string                   `json:"number" gorm:"column:number;type:varchar(255)"`           //单号
    SourceNumber    string                   `json:"sourceNumber" gorm:"type:varchar(255)"`                   //源单号
    OperationTypeId int                      `json:"operationTypeId" gorm:"type:int;not null;comment:作业类型id"` //作业类型id
    Status          constvar.OperationStatus `json:"status" gorm:"type:int(11);not null;comment:状态"`          //状态
    FromLocationId  int                      `json:"fromLocationId"   gorm:"type:int;not null;comment:源位置id"` //源位置id
    ToLocationId    int                      `json:"toLocationId"    gorm:"type:int;not null;comment:目标位置id"` //目标位置id
    OperationDate   util.JSONTime            `json:"operationDate" gorm:"comment:安排日期"`
    Details         []*OperationDetails      `json:"details"`
}
 
type OperationDetails struct {
    ProductId      int             `json:"productId" gorm:"type:int;not null;comment:产品id"`              //产品id
    ProductName    string          `json:"productName" gorm:"type:varchar(255);not null;comment:产品名称"`   //产品名称
    Quantity       decimal.Decimal `json:"quantity" gorm:"type:decimal(20,2);not null;comment:数量"`       //数量
    FinishQuantity decimal.Decimal `json:"finishQuantity" gorm:"type:decimal(20,2);not null;comment:数量"` //完成数量
}