Documentation ¶
Index ¶
- Variables
- type Consume
- type ConsumeModel
- type CosCop
- type Coupon
- type CouponItem
- type CouponModel
- type CusCopModel
- func (c CusCopModel) Get(id string) (cc CosCop, err error)
- func (c CusCopModel) GetByIDAndPhone(status int) (cc CosCop, err error)
- func (c CusCopModel) GetList() (ccs []CouponItem, err error)
- func (c CusCopModel) HasCouponCode(code int) bool
- func (c CusCopModel) Insert(id int) error
- func (c CusCopModel) IsNotUseID(id int) bool
- type Customer
- type CustomerModel
- type DailySumModel
- type Time
Constants ¶
This section is empty.
Variables ¶
View Source
var ConsumeTableName = "consume"
View Source
var CosCopTabelName = "cus_cop"
View Source
var CustomerTableName = "customer"
Functions ¶
This section is empty.
Types ¶
type ConsumeModel ¶
type ConsumeModel struct { CopID string `json:"code" binding:"required"` MchPhone string `json:"mchid" binding:"required"` }
func (ConsumeModel) DailySum ¶
func (con ConsumeModel) DailySum(date time.Time) (dailySumModel DailySumModel, err error)
type CouponItem ¶
type CouponItem struct { Code string `json:"code" gorm:"column:code"` Denominations int `json:"denominations" gorm:"column:amount"` OriginCondition int `json:"originCondition" gorm:"-"` Value int `json:"value" gorm:"column:amount"` Name string `json:"name" gorm:"column:title"` StartAt Time `json:"startAt" gorm:"column:start_time"` EndAt Time `json:"endAt" gorm:"column:exp_time"` }
type CouponModel ¶
type CouponModel struct {
ID string
}
func (CouponModel) GetByCusCopID ¶
func (c CouponModel) GetByCusCopID(id string) (coupon Coupon, err error)
type CusCopModel ¶
type CusCopModel struct { CopID string `json:"cop_id" binding:"required"` Phone string `json:"phone" binding:"required"` }
func (CusCopModel) GetByIDAndPhone ¶
func (c CusCopModel) GetByIDAndPhone(status int) (cc CosCop, err error)
func (CusCopModel) GetList ¶
func (c CusCopModel) GetList() (ccs []CouponItem, err error)
func (CusCopModel) HasCouponCode ¶
func (c CusCopModel) HasCouponCode(code int) bool
func (CusCopModel) Insert ¶
func (c CusCopModel) Insert(id int) error
func (CusCopModel) IsNotUseID ¶
func (c CusCopModel) IsNotUseID(id int) bool
type CustomerModel ¶
func (CustomerModel) GetCustomer ¶
func (c CustomerModel) GetCustomer(phone string) (customer Customer, err error)
type DailySumModel ¶
Click to show internal directories.
Click to hide internal directories.