| | |
| | | type ( |
| | | // MasterOrder 销售总单 |
| | | MasterOrder struct { |
| | | Id int `json:"id" gorm:"column:id;primary_key;AUTO_INCREMENT"` |
| | | Number string `json:"number" gorm:"column:number;type:varchar(255);comment:销售总单号"` |
| | | ClientId int `json:"client_id" gorm:"column:client_id;type:int;comment:客户id"` |
| | | Client Client `json:"client" gorm:"foreignKey:ClientId"` |
| | | MemberId int `json:"member_id" gorm:"column:member_id;type:int;comment:负责人id"` |
| | | StartTime time.Time `json:"start_time" gorm:"column:start_time;type:datetime;comment:开始时间"` |
| | | EndTime time.Time `json:"end_time" gorm:"column:end_time;type:datetime;comment:结束时间"` |
| | | Money float64 `json:"money" gorm:"column:money;type:decimal(10,2);comment:总金额"` |
| | | Id int `json:"id" gorm:"column:id;primary_key;AUTO_INCREMENT"` |
| | | Number string `json:"number" gorm:"column:number;type:varchar(255);comment:销售总单号"` |
| | | ClientId int `json:"client_id" gorm:"column:client_id;type:int;comment:客户id"` |
| | | Client Client `json:"client" gorm:"foreignKey:ClientId"` |
| | | MemberId int `json:"member_id" gorm:"column:member_id;type:int;comment:负责人id"` |
| | | StartTime *time.Time `json:"start_time" gorm:"column:start_time;type:datetime;comment:开始时间"` |
| | | EndTime *time.Time `json:"end_time" gorm:"column:end_time;type:datetime;comment:结束时间"` |
| | | Money float64 `json:"money" gorm:"column:money;type:decimal(10,2);comment:总金额"` |
| | | gorm.Model `json:"-"` |
| | | } |
| | | |
| | |
| | | MasterOrderSearch struct { |
| | | MasterOrder |
| | | |
| | | Orm *gorm.DB |
| | | Orm *gorm.DB |
| | | Keyword string |
| | | OrderBy string |
| | | PageNum int |
| | | PageSize int |
| | | |
| | | } |
| | | ) |
| | | |
| | |
| | | func (slf *MasterOrderSearch) SetOrder(order string) *MasterOrderSearch { |
| | | slf.OrderBy = order |
| | | return slf |
| | | } |
| | | } |