zhangqian
2023-08-16 d87a424d3e1737a730b4c503ac1dbb74a176fe58
model/salesRefund.go
@@ -15,8 +15,8 @@
      ClientId      int                       `json:"clientId" gorm:"column:client_id;type:int;comment:客户id"`
      Client        Client                    `json:"client" gorm:"foreignKey:ClientId"`
      Number        string                    `json:"number" gorm:"column:number;type:varchar(255);comment:退款单号"`
      SourceType    constvar.RefundSourceType `gorm:"column:source_type;type:int;not null;default 0;comment:来源类型(1销售明细单2服务合同3销售发票4收款计划5出库单)" json:"sourceType"` // 来源类型(1销售明细单2服务合同3销售发票4收款计划5出库单)
      SourceId      int                       `gorm:"column:source_id;type:int;not null;default 0;comment:源单id " json:"sourceId"`                               // 源单id
      SourceType    constvar.RefundSourceType `gorm:"column:source_type;type:int;not null;default 0;comment:来源类型(1销售退货)" json:"sourceType"` // 来源类型(1销售退货)
      SourceId      int                       `gorm:"column:source_id;type:int;not null;default 0;comment:源单id " json:"sourceId"`           // 源单id
      MemberId      int                       `json:"memberId" gorm:"column:member_id;type:int;comment:负责人id"`
      Member        User                      `json:"member" gorm:"foreignKey:MemberId"`
      RefundDate    string                    `json:"refundDate" gorm:"column:refund_date;type:datetime;comment:退款日期"`
@@ -138,6 +138,16 @@
   return slf
}
func (slf *SalesRefundSearch) SetSourceType(sourceType constvar.RefundSourceType) *SalesRefundSearch {
   slf.SourceType = sourceType
   return slf
}
func (slf *SalesRefundSearch) SetSourceId(id int) *SalesRefundSearch {
   slf.SourceId = id
   return slf
}
func (slf *SalesRefundSearch) SetPreload(preload bool) *SalesRefundSearch {
   slf.Preload = preload
   return slf