123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364 |
- package model
- import (
- "go-common/library/time"
- )
- // order status
- const (
- PAYING int8 = iota + 1
- SUCCESS
- FAILED
- Sign
- UnSign
- REFUNDING
- REFUNDED
- REFUNDFAIL
- CANCEL = 20
- )
- // order type
- const (
- General int8 = iota
- AutoRenew
- )
- // quick pay status
- const (
- QuickPaySuccess int8 = iota + 1
- QuickPayFailed
- )
- // pay way
- const (
- ALIPAY int8 = iota + 1
- WECHAT
- BCION
- BANK
- PAYPAL
- IOSPAY
- QPAY
- )
- // pay origin
- const (
- MobileOrigin int8 = iota + 1
- WebOrigin
- H5
- )
- // PayType pay type
- var PayType = map[int8]string{
- ALIPAY: "alipay",
- WECHAT: "wechat",
- BCION: "bp",
- BANK: "bank",
- PAYPAL: "paypal",
- IOSPAY: "iospay",
- QPAY: "qpay",
- }
- // PayTypeName pay name.
- var PayTypeName = map[string]int8{
- "alipay": ALIPAY,
- "wechat": WECHAT,
- "bp": BCION,
- "bank": BANK,
- "paypal": PAYPAL,
- "iospay": IOSPAY,
- }
- // AddPayOrderResp add pay order
- type AddPayOrderResp struct {
- OrderNo string `json:"order_no"`
- CashierURL string `json:"cashier_url"`
- QrcodeURL string `json:"qrcode_url"`
- }
- //PayBankResp pay bank resp
- type PayBankResp struct {
- BanckCode string `json:"bankCode"`
- Name string `json:"name"`
- Res string `json:"res"`
- }
- //PayAccountResp .
- type PayAccountResp struct {
- Mid int64 `json:"mid"`
- Brokerage float64 `json:"brokerage"`
- DefaultBp float64 `json:"default_bp"`
- }
- //APIPayOrderResp api pay resp.
- type APIPayOrderResp struct {
- SDK string `json:"sdk"`
- QrcodeURL string `json:"qrcode_url"`
- CashierURL string `json:"cashier_url"`
- RechargeOrderNo string `json:"recharge_order_no"`
- }
- // QucikPayResp quick pay token.
- type QucikPayResp struct {
- Token string `json:"token"`
- }
- // PayRetResp pay ret response.
- type PayRetResp struct {
- Status int8 `json:"status"`
- }
- // BuyVipResp buy vip resp.
- type BuyVipResp struct {
- Qrcode string `json:"qrcode"`
- CashierURL string `json:"cashier_url"`
- OrderNo string `json:"orderNo"`
- RechargeOrderNo string `json:"rechargeOrderNo"`
- PayPayOrderNo string `json:"payPayOrderNo"`
- PaySign string `json:"paySign"`
- Status int8 `json:"status"`
- ProductID string `json:"productId"`
- }
- //PayOrder pay order
- type PayOrder struct {
- ID int64 `json:"_"`
- OrderNo string `json:"order_no"`
- AppID int64 `json:"app_id"`
- Platform int8 `json:"platform"`
- OrderType int8 `json:"order_type"`
- AppSubID string `json:"app_sub_id"`
- Mid int64 `json:"mid"`
- ToMid int64 `json:"to_mid"`
- BuyMonths int16 `json:"buy_months"`
- Money float64 `json:"money"`
- RefundAmount float64 `json:"refund_amount"`
- Status int8 `json:"status"`
- PayType int8 `json:"pay_type"`
- RechargeBp float64 `json:"recharge_bp"`
- ThirdTradeNo string `json:"third_trade_no"`
- Ver int64 `json:"ver"`
- CouponMoney float64 `json:"coupon_money"`
- PaymentTime time.Time `json:"payment_time"`
- Ctime time.Time `json:"ctime"`
- Mtime time.Time `json:"mtime"`
- PID int64 `json:"p_id"`
- UserIP []byte `json:"-"`
- }
- //PayOrderResp pay order resp.
- type PayOrderResp struct {
- OrderNo string `json:"order_no"`
- BuyMonths int16 `json:"buy_months"`
- Money float64 `json:"money"`
- Status int8 `json:"status"`
- Remark string `json:"remark"`
- Ctime time.Time `json:"ctime"`
- }
- // Month def.
- type Month struct {
- ID int64 `json:"_"`
- Month int16 `json:"month"`
- MonthType int8 `json:"month_type"`
- Operator string `json:"operator"`
- Status int8 `json:"status"`
- Deleted int8 `json:"deleted"`
- Mtime time.Time `json:"mtime"`
- }
- // PriceMapping vip month map.
- type PriceMapping struct {
- ID int64 `json:"_"`
- MonthID int64 `json:"month_id"`
- MonthType int8 `json:"month_type"`
- Money float64 `json:"money"`
- Selected int8 `json:"selected"`
- FirstDiscountMoney float64 `json:"first_discount_money"`
- DiscountMoney float64 `json:"discount_money"`
- StartTime time.Time `json:"start_time"`
- EndTime time.Time `json:"end_time"`
- Remark string `json:"remark"`
- Operator string `json:"operator"`
- Mtime time.Time `json:"mtime"`
- }
- //PayPlatformOrder .
- type PayPlatformOrder struct {
- CustomerID string `json:"customerId"`
- DeviceType int8 `json:"deviceType"`
- OrderID string `json:"orderId"`
- OrderCreateTime string `json:"orderCreateTime"`
- OrderExpire int64 `json:"orderExpire"`
- NotifyURL string `json:"notifyUrl"`
- SignURL string `json:"signUrl"`
- ShowTitle string `json:"showTitle"`
- TraceID string `json:"traceId"`
- Timestamp string `json:"timestamp"`
- Version string `json:"version"`
- SignType string `json:"signType"`
- Sign string `json:"sign"`
- ProductID string `json:"productId"`
- PayAmount int32 `json:"payAmount"`
- PlanID int32 `json:"planId"`
- UID int64 `json:"uid"`
- DisplayAccount string `json:"displayAccount"`
- ServiceType int32 `json:"serviceType"`
- OriginalAmout int32 `json:"originalAmount"`
- }
- // OrderInfo order info.
- type OrderInfo struct {
- ID int64
- OrderNo string
- AppID int64
- OrderType int8
- Platform int8
- Mid int64
- ToMid int64
- BuyMonths int16
- Money float64
- RefundAmount float64
- Status int8
- PayType string
- RechargeBP float64
- ThirdTradeNo string
- PaymentTime time.Time
- Ver int64
- Ctime time.Time
- Mtime time.Time
- AppSubID string
- }
- //OrderMng .
- type OrderMng struct {
- Username string `json:"username"`
- Mid int64 `json:"mid"`
- IsAutoRenew int8 `json:"isAuto_renew"`
- ExpireDate string `json:"expire_date"`
- NextDedutionDate string `json:"next_dedution_date"`
- AutoRenewLoop string `json:"auto_renew_loop"`
- PriceTip string `json:"price_tip"`
- ChannelID int32 `json:"channel_id"`
- PayType string `json:"pay_type"`
- }
- // OrderMessage .
- type OrderMessage struct {
- LeftButton string `json:"left_button"`
- RightButton string `json:"right_button"`
- LeftButtonLink string `json:"left_button_link"`
- RightButtonLink string `json:"right_button_link"`
- Title string `json:"title"`
- Content string `json:"content"`
- }
- //VipUserDiscountHistory .
- type VipUserDiscountHistory struct {
- ID int64 `json:"id"`
- Mid int64 `json:"mid"`
- DiscountID int64 `json:"discount_id"`
- OrderNo string `json:"order_no"`
- Status int8 `json:"status"`
- }
- //PannelInfo .
- type PannelInfo struct {
- VipMonths []*VipMonthsPriceBo `json:"vipMonths"`
- PayTypes []*PayTypeBo `json:"payTypes"`
- BcoinTips string `json:"bcoinTips"`
- }
- //PayTypeBo .
- type PayTypeBo struct {
- Name string `json:"name"`
- Code string `json:"code"`
- Banks []*PayBankBo `json:"banks"`
- }
- //VipMonthsPriceBo .
- type VipMonthsPriceBo struct {
- ID int64 `json:"_"`
- Month int16 `json:"month"`
- DiscountRate string `json:"discount_rate"`
- MonthStr string `json:"month_str"`
- MonthID int64 `json:"month_id"`
- OrderType int8 `json:"order_type"`
- MonthType int8 `json:"month_type"`
- OriginalPrice float64 `json:"original_price"`
- Selected int8 `json:"selected"`
- FirstDiscountMoney float64 `json:"first_discount_money"`
- Price float64 `json:"price"`
- Remark string `json:"remark"`
- }
- //PayBankBo .
- type PayBankBo struct {
- Code string `json:"code"`
- Name string `json:"name"`
- Image string `json:"image"`
- }
- //VipPayOrderLog vip pay order log table
- type VipPayOrderLog struct {
- ID int64 `json:"id"`
- OrderNo string `json:"order_no"`
- RefundID string `json:"refund_id"`
- RefundAmount float64 `json:"refund_amount"`
- Mid int64 `json:"mid"`
- Status int8 `json:"status"`
- }
- //VipPayOrderOld vip pay order table
- type VipPayOrderOld struct {
- ID int64 `json:"id"`
- OrderNo string `json:"orderNo"`
- AppID int64 `json:"appId"`
- Platform int8 `json:"platform"`
- OrderType int8 `json:"orderType"`
- Mid int64 `json:"mid"`
- Bmid int64 `json:"bmid"`
- BuyMonths int16 `json:"buyMonths"`
- Money float64 `json:"money"`
- Status int8 `json:"status"`
- PayType int8 `json:"payType"`
- PaymentTime time.Time `json:"paymentTime"`
- Ver int64 `json:"ver"`
- AppSubID string `json:"appSubId"`
- PID int64 `json:"pid"`
- UserIP []byte `json:"user_ip"`
- }
- //VipOldPayOrder vip pay order table
- type VipOldPayOrder struct {
- ID int64
- OrderNo string
- AppID int64
- Platform int8
- OrderType int8
- Mid int64
- Bmid int64
- BuyMonths int16
- Money float64
- Status int8
- PaymentTime time.Time
- Ver int64
- AppSubID string
- CouponMoney float64
- PID int64 //套餐ID
- UserIP []byte
- }
- // VipOldRechargeOrder vip recharge order.
- type VipOldRechargeOrder struct {
- AppID int64
- PayMid int64
- OrderNo string
- RechargeBp float64
- PayOrderNO string
- Status int8
- Remark string
- Ver int64
- Ctime time.Time
- Bmid int64
- ThirdTradeNO string
- }
|