model

package
v0.0.0-...-83adff0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 6, 2020 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AllowanceNone = iota
	AllowanceSystemAdmin
	AllowanceBusinessReceive
)

allowance origin

View Source
const (
	VipSalary int64 = iota + 1
	SystemAdminSalary
	Consume
	ConsumeFaildBack
)

blance change type

View Source
const (
	CouponVideo = iota + 1
	CouponCartoon
	CouponAllowance
	CouponAllowanceCode
)

coupon type

View Source
const (
	NotUsed = iota
	InUse
	Used
	Expire
	Block
)

coupon state.

View Source
const (
	NoLimitExplain = "不限定"
	ScopeFmt       = "仅限%s端使用"
)

allowance explain

View Source
const (
	BatchStateNormal int8 = iota
	BatchStateBlock
)

batch state

View Source
const (
	AllowanceSalary int8 = iota + 1
	AllowanceConsume
	AllowanceCancel
	AllowanceConsumeSuccess
	AllowanceConsumeFaild
	AllowanceBlock
	AllowanceUnBlock
)

allowance change type

View Source
const (
	ProdLimRenewalAll int8 = iota
	ProdLimRenewalAuto
	ProdLimRenewalNotAuto
)

coupon_batch_info表 product_limit_renewal字段.

View Source
const (
	None           int8 = 0
	ProdLimMonth1       = 1
	ProdLimMonth3       = 3
	ProdLimMonth12      = 12
)

coupon_batch_info表 product_limit_renewal字段.

View Source
const (
	CodeStateNotUse = iota + 1
	CodeStateUsed
	CodeStateBlock
	CodeStateExpire
)

coupon code state.

View Source
const (
	BatchCodeMaxCount = 50000
	BatchAddCodeSlice = 100
)

batch code max count.

View Source
const (
	CodeBatchUsable = iota
	CodeBatchBlock
	CodeBatchExpire
)

code batch state.

View Source
const (
	AdminSalaryOrigin int64 = iota + 1
)

batch origin

Variables

View Source
var (
	ProdLimMonthMap   = map[int8]string{None: "", ProdLimMonth1: "1月", ProdLimMonth3: "3月", ProdLimMonth12: "12月"}
	ProdLimRenewalMap = map[int8]string{ProdLimRenewalAll: "", ProdLimRenewalAuto: "自动续期", ProdLimRenewalNotAuto: "非自动续期"}
)

ProdLimit .

Functions

This section is empty.

Types

type AppInfo

type AppInfo struct {
	ID        int64     `json:"id"`
	Name      string    `json:"name"`
	Appkey    string    `json:"appkey"`
	NotifyURL string    `json:"notify_url"`
	Ctime     time.Time `json:"ctime"`
	Mtime     time.Time `json:"mtime"`
}

AppInfo app info.

type ArgAllowance

type ArgAllowance struct {
	ID int64 `form:"id" validate:"required,min=1,gte=1"`
}

ArgAllowance arg.

type ArgAllowanceBatchInfo

type ArgAllowanceBatchInfo struct {
	AppID          int64   `form:"app_id" validate:"required,min=1,gte=1"`
	Name           string  `form:"name" validate:"required"`
	MaxCount       int64   `form:"max_count"`
	LimitCount     int64   `form:"limit_count"`
	StartTime      int64   `form:"start_time"`
	ExpireTime     int64   `form:"end_time"`
	ExpireDay      int64   `form:"expire_day" default:"-1"`
	Amount         float64 `form:"amount" validate:"required,min=1,gte=1"`
	FullAmount     float64 `form:"full_amount" validate:"required,min=1,gte=1"`
	PlatformLimit  []int64 `form:"platform_limit,split"`
	ProdLimMonth   int8    `form:"product_limit_month"`
	ProdLimRenewal int8    `form:"product_limit_Renewal" validate:"gte=0,lte=2"`
}

ArgAllowanceBatchInfo allowance arg.

type ArgAllowanceBatchInfoModify

type ArgAllowanceBatchInfoModify struct {
	ID             int64   `form:"id" validate:"required,min=1,gte=1"`
	AppID          int64   `form:"app_id" validate:"required,min=1,gte=1"`
	Name           string  `form:"name" validate:"required"`
	MaxCount       int64   `form:"max_count" `
	LimitCount     int64   `form:"limit_count"`
	PlatformLimit  []int64 `form:"platform_limit,split"`
	ProdLimMonth   int8    `form:"product_limit_month" validate:"gte=0"`
	ProdLimRenewal int8    `form:"product_limit_Renewal" validate:"gte=0,lte=2"`
}

ArgAllowanceBatchInfoModify allowance modify arg.

type ArgAllowanceInfo

type ArgAllowanceInfo struct {
	BatchToken string `form:"batch_token" validate:"required"`
}

ArgAllowanceInfo arg.

type ArgAllowanceSalary

type ArgAllowanceSalary struct {
	Mids       []int64 `form:"mids,split"`
	BatchToken string  `form:"batch_token" validate:"required"`
	MsgType    string  `form:"msg_type" default:"vip"`
}

ArgAllowanceSalary allowance salary arg.

type ArgAllowanceSearch

type ArgAllowanceSearch struct {
	PN          int    `form:"pn" default:"1"`
	PS          int    `form:"ps" default:"20"`
	AppID       int64  `form:"app_id"`
	Mid         int64  `form:"mid" validate:"required,min=1,gte=1"`
	OrderNO     string `form:"order_no"`
	CouponToken string `form:"coupon_token"`
	BatchToken  string `form:"batch_token"`
}

ArgAllowanceSearch allowance search struct

type ArgAllowanceState

type ArgAllowanceState struct {
	Mid         int64  `form:"mid" validate:"required,min=1,gte=1"`
	CouponToken string `form:"coupon_token" validate:"required"`
}

ArgAllowanceState arg.

type ArgBatchInfo

type ArgBatchInfo struct {
	AppID      int64  `form:"app_id" validate:"required,min=1,gte=1"`
	Name       string `form:"name" validate:"required"`
	MaxCount   int64  `form:"max_count" validate:"required,min=1,gte=1"`
	LimitCount int64  `form:"limit_count"`
	StartTime  int64  `form:"start_time" validate:"required,min=1,gte=1"`
	ExpireTime int64  `form:"end_time" validate:"required,min=1,gte=1"`
}

ArgBatchInfo arg.

type ArgBatchList

type ArgBatchList struct {
	AppID int64 `form:"app_id"`
	Type  int8  `form:"type" default:"3"`
}

ArgBatchList arg.

type ArgBatchSalaryCoupon

type ArgBatchSalaryCoupon struct {
	FileURL     string `form:"file_url" validate:"required"`
	Count       int64  `form:"count" validate:"required,min=1,gte=1"`
	BranchToken string `form:"branch_token" validate:"required"`
	SliceSize   int    `form:"slice_size" default:"100" validate:"min=100,max=10000"`
}

ArgBatchSalaryCoupon batch salary coupon.

type ArgCouponCode

type ArgCouponCode struct {
	ID          int64  `form:"id"`
	BatchToken  string `form:"batch_token"`
	State       int32  `form:"state"`
	Code        string `form:"code"`
	Mid         int64  `form:"mid"`
	CouponType  int32  `form:"coupon_type"`
	CouponToken string `form:"coupon_token"`
	Pn          int    `form:"pn"`
	Ps          int    `form:"ps"`
}

ArgCouponCode coupon code.

type ArgCouponViewBatch

type ArgCouponViewBatch struct {
	ID           int64  `form:"id"`
	Name         string `form:"name" validate:"required"`
	AppID        int64  `form:"app_id" validate:"required,min=1"`
	MaxCount     int64  `form:"max_count" default:"-1"`
	CurrentCount int64  `form:"current_count"`
	LimitCount   int64  `form:"limit_count" default:"-1"`
	StartTime    int64  `form:"start_time" validate:"required,min=1"`
	ExpireTime   int64  `form:"end_time" validate:"required,min=1"`
	Operator     string `form:"operator"`
	Ver          int64
	BatchToken   string
	CouponType   int8
}

ArgCouponViewBatch .

type ArgSalaryCoupon

type ArgSalaryCoupon struct {
	Mid         int64  `form:"mid" validate:"required,min=1,gte=1"`
	CouponType  int64  `form:"coupon_type" validate:"required,min=1,gte=1"`
	Count       int    `form:"count" validate:"required,min=1,gte=1"`
	BranchToken string `form:"branch_token" validate:"required"`
}

ArgSalaryCoupon salary coupon.

type ArgSearchCouponView

type ArgSearchCouponView struct {
	PN          int    `form:"pn" default:"1"`
	PS          int    `form:"ps" default:"20"`
	Mid         int64  `form:"mid" validate:"required"`
	CouponToken string `form:"coupon_token"`
	AppID       int64  `form:"app_id"`
	BatchToken  string `form:"batch_token"`
	BatchTokens []string
}

ArgSearchCouponView .

type ArgUploadFile

type ArgUploadFile struct {
	FileURL string `form:"url" validate:"required"`
}

ArgUploadFile upload file arg.

type CodePage

type CodePage struct {
	Count    int64         `json:"count"`
	CodeList []*CouponCode `json:"code_list"`
}

CodePage code page.

type CouponAllowanceChangeLog

type CouponAllowanceChangeLog struct {
	ID          int64     `json:"-"`
	CouponToken string    `json:"coupon_token"`
	OrderNO     string    `json:"order_no"`
	Mid         int64     `json:"mid"`
	State       int8      `json:"state"`
	ChangeType  int8      `json:"change_type"`
	Ctime       time.Time `json:"ctime"`
	Mtime       time.Time `json:"mtime"`
}

CouponAllowanceChangeLog coupon allowance change log.

type CouponAllowanceInfo

type CouponAllowanceInfo struct {
	ID          int64     `json:"id"`
	CouponToken string    `json:"coupon_token"`
	Mid         int64     `json:"mid"`
	State       int32     `json:"state"`
	StartTime   int64     `json:"start_time"`
	ExpireTime  int64     `json:"expire_time"`
	Origin      int64     `json:"origin"`
	OrderNO     string    `json:"order_no"`
	Ver         int64     `json:"ver"`
	Remark      string    `json:"remark"`
	CTime       time.Time `json:"ctime"`
	MTime       time.Time `json:"mtime"`
	BatchToken  string    `json:"batch_token"`
	Amount      float64   `json:"amount"`
	FullAmount  float64   `json:"full_amount"`
	AppID       int64     `json:"app_id"`
}

CouponAllowanceInfo coupon allowance info.

type CouponBatchInfo

type CouponBatchInfo struct {
	ID             int64     `json:"id"`
	AppID          int64     `json:"app_id"`
	Name           string    `json:"name"`
	BatchToken     string    `json:"batch_token"`
	MaxCount       int64     `json:"max_count"`
	CurrentCount   int64     `json:"current_count"`
	StartTime      int64     `json:"start_time"`
	ExpireTime     int64     `json:"expire_time"`
	ExpireDay      int64     `json:"expire_day"`
	Ver            int64     `json:"ver"`
	Ctime          time.Time `json:"ctime"`
	Mtime          time.Time `json:"mtime"`
	Operator       string    `json:"operator"`
	LimitCount     int64     `json:"limit_count"`
	FullAmount     float64   `json:"full_amount"`
	Amount         float64   `json:"amount"`
	State          int8      `json:"state"`
	CouponType     int8      `json:"coupon_type"`
	PlatformLimit  string    `json:"platform_limit"`
	ProdLimMonth   int8      `json:"product_limit_month"`
	ProdLimRenewal int8      `json:"product_limit_Renewal"`
}

CouponBatchInfo info.

type CouponBatchResp

type CouponBatchResp struct {
	ID                  int64   `json:"id"`
	AppID               int64   `json:"app_id"`
	AppName             string  `json:"app_name"`
	Name                string  `json:"name"`
	BatchToken          string  `json:"batch_token"`
	MaxCount            int64   `json:"max_count"`
	CurrentCount        int64   `json:"current_count"`
	StartTime           int64   `json:"start_time"`
	ExpireTime          int64   `json:"expire_time"`
	ExpireDay           int64   `json:"expire_day"`
	Operator            string  `json:"operator"`
	LimitCount          int64   `json:"limit_count"`
	ProductLimitExplain string  `json:"product_limit_explain"`
	PlatfromLimit       []int64 `json:"platform_limit"`
	UseLimitExplain     string  `json:"use_limit_explain"`
	State               int8    `json:"state"`
	Amount              float64 `json:"amount"`
	FullAmount          float64 `json:"full_amount"`
	ProdLimMonth        int8    `json:"product_limit_month"`
	ProdLimRenewal      int8    `json:"product_limit_Renewal"`
}

CouponBatchResp resp.

func (*CouponBatchResp) ProdLimExplainFmt

func (c *CouponBatchResp) ProdLimExplainFmt(prodLimMonth, prodLimRenewal int8)

ProdLimExplainFmt .

type CouponChangeLog

type CouponChangeLog struct {
	CouponToken string `json:"coupon_token"`
	Mid         int64  `json:"mid"`
	State       int8   `json:"state"`
}

CouponChangeLog .

type CouponCode

type CouponCode struct {
	ID          int64     `json:"id"`
	BatchToken  string    `json:"batch_token"`
	State       int32     `json:"state"`
	Code        string    `json:"code"`
	Mid         int64     `json:"mid"`
	CouponType  int32     `json:"coupon_type"`
	CouponToken string    `json:"coupon_token"`
	Ver         int64     `json:"ver"`
	Ctime       time.Time `json:"ctime"`
	Mtime       time.Time `json:"mtime"`
}

CouponCode coupon code.

type CouponInfo

type CouponInfo struct {
	CouponToken string    `json:"coupon_token"`
	Mid         int64     `json:"mid"`
	State       int8      `json:"state"`
	StartTime   int64     `json:"start_time"`
	ExpireTime  int64     `json:"expire_time"`
	Origin      int8      `json:"origin"`
	CouponType  int8      `json:"coupon_type"`
	OrderNo     string    `json:"order_no"`
	OID         int32     `json:"oid"`
	Remark      string    `json:"remark"`
	UseVer      int64     `json:"use_ver"`
	Ctime       time.Time `json:"ctime"`
	Mtime       time.Time `json:"mtime"`
	BatchToken  string    `json:"batch_token"`
	Title       string    `json:"title"`
	BatchName   string    `json:"batch_name"`
}

CouponInfo .

type CouponResp

type CouponResp struct {
	Token     string `json:"token"`
	Mid       int64  `json:"mid"`
	GrantTime int64  `json:"grant_time"`
	UseTime   int64  `json:"use_time"`
	State     int8   `json:"state"`
	Remark    int8   `json:"remark"`
}

CouponResp def.

type PGCInfoResq

type PGCInfoResq struct {
	Title string `json:"title"`
}

PGCInfoResq .

type PageCouponInfo

type PageCouponInfo struct {
	Count int         `json:"count"`
	Item  interface{} `json:"item"`
}

PageCouponInfo common page info.

type PageInfo

type PageInfo struct {
	Count       int         `json:"count"`
	CurrentPage int         `json:"currentPage,omitempty"`
	Item        interface{} `json:"item"`
}

PageInfo common page info.

type SearchData

type SearchData struct {
	Code int `json:"code"`
	Data *struct {
		Order  string                 `json:"order"`
		Sort   string                 `json:"sort"`
		Page   *SearchPage            `json:"page"`
		Result []*CouponAllowanceInfo `json:"result"`
	}
}

SearchData search result detail.

type SearchPage

type SearchPage struct {
	PN    int `json:"num"`
	PS    int `json:"size"`
	Total int `json:"total"`
}

SearchPage struct.

type Sizer

type Sizer interface {
	Size() int64
}

Sizer .

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL