zhangqian
2023-08-11 ae6883ce426727efca4facab973d814ae66c69c2
model/salesRefund.go
@@ -3,33 +3,31 @@
import (
   "aps_crm/pkg/mysqlx"
   "gorm.io/gorm"
   "time"
)
type (
   SalesRefund struct {
      Id           int       `json:"id" gorm:"column:id;primary_key;AUTO_INCREMENT"`
      ClientId     int       `json:"clientId" gorm:"column:client_id;type:int;comment:客户id"`
      Number       string    `json:"number" gorm:"column:number;type:varchar(255);comment:退款单号"`
      MemberId     int       `json:"memberId" gorm:"column:member_id;type:int;comment:负责人id"`
      RefundDate   time.Time `json:"refundDate" gorm:"column:refund_date;type:datetime;comment:退款日期"`
      RefundMethod string    `json:"refundMethod" gorm:"column:refund_method;type:varchar(255);comment:退款方式"`
      AccountId    int       `json:"accountId" gorm:"column:account_id;type:int;comment:账户"`
      IsInvoice    int       `json:"isInvoice" gorm:"column:is_invoice;type:int;comment:是否开票"`
      Reason       string    `json:"reason" gorm:"column:reason;type:varchar(255);comment:退款原因"`
      Products     []Product `json:"products" gorm:"many2many:salesRefund_product;"`
      Id           int         `json:"id" gorm:"column:id;primary_key;AUTO_INCREMENT"`
      ClientId     int         `json:"clientId" gorm:"column:client_id;type:int;comment:客户id"`
      Number       string      `json:"number" gorm:"column:number;type:varchar(255);comment:退款单号"`
      MemberId     int         `json:"memberId" gorm:"column:member_id;type:int;comment:负责人id"`
      RefundDate   *CustomTime `json:"refundDate" gorm:"column:refund_date;type:datetime;comment:退款日期"`
      RefundMethod string      `json:"refundMethod" gorm:"column:refund_method;type:varchar(255);comment:退款方式"`
      AccountId    int         `json:"accountId" gorm:"column:account_id;type:int;comment:账户"`
      IsInvoice    int         `json:"isInvoice" gorm:"column:is_invoice;type:int;comment:是否开票"`
      Reason       string      `json:"reason" gorm:"column:reason;type:varchar(255);comment:退款原因"`
      Products     []Product   `json:"products" gorm:"many2many:salesRefund_product;"`
      gorm.Model   `json:"-"`
   }
   SalesRefundSearch struct {
      SalesRefund
            Orm      *gorm.DB
      Orm      *gorm.DB
      Keyword  string
      OrderBy  string
      PageNum  int
      PageSize int
   }
)
@@ -114,4 +112,4 @@
func (slf *SalesRefundSearch) SetOrder(order string) *SalesRefundSearch {
   slf.OrderBy = order
   return slf
}
}