liujiandao
2023-10-13 5fa1de02759b9646e8987312736699755990e960
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
package request
 
import (
    "aps_crm/constvar"
    "aps_crm/model"
    "aps_crm/proto/code"
)
 
type AddSalesReturnRequest struct {
    SalesReturn SalesReturn
}
 
type SalesReturn struct {
    ClientId            int                            `json:"clientId" gorm:"column:client_id;type:int;comment:客户id"`
    SourceType          constvar.SalesReturnSourceType `gorm:"source_type" json:"sourceType"` // 源单类型(1销售明细)
    SourceId            int                            `gorm:"source_id" json:"sourceId"`     // 源单id
    Number              string                         `json:"number" gorm:"column:number;type:varchar(255);comment:退货单号"`
    Repository          string                         `json:"repository" gorm:"column:repository;type:varchar(255);comment:仓库"`
    MemberId            int                            `json:"memberId" gorm:"column:member_id;type:int;comment:负责人id"`
    ReturnDate          string                         `json:"returnDate" gorm:"column:return_date;type:datetime(3);comment:退货日期"`             //退货日期
    SalesReturnStatusId int                            `json:"salesReturnStatusId" gorm:"column:sales_return_status_id;type:int;comment:退货状态"` //退货状态id
    CreatorId           int                            `json:"-" gorm:"column:creator_id;type:int;comment:创建人id"`                              //创建人ID
    Creator             User                           `json:"-"  gorm:"foreignKey:CreatorId"`                                                 //创建人信息
    Reason              string                         `json:"reason" gorm:"column:reason;type:varchar(255);comment:退货原因"`                     //退货原因
    Products            []*model.Product               `json:"products" gorm:"many2many:salesReturn_product;"`                                 //退货产品
    CodeStandID         string                         `json:"codeStandID"`                                                                    //编码id
    CodeRule            code.CodeStandard              `json:"codeRule"`
}
 
type UpdateSalesReturnRequest struct {
    Id          int `json:"id" gorm:"column:id;primary_key;AUTO_INCREMENT"`
    SalesReturn SalesReturn
}
 
type GetSalesReturnList struct {
    PageInfo
    Keyword     string `json:"keyword"`
    KeywordType constvar.SalesReturnKeywordType
    SourceType  constvar.SalesReturnSourceType `json:"sourceType"` // 源单类型(1销售明细)
    SourceId    int                            `json:"sourceId"`   // 源单id
    ClientId    int                            `json:"clientId"`   //客户id
}