|
@@ -31,7 +31,8 @@ type UserProduct struct {
|
|
InterfaceStatus int `json:"interface_status"` //接口状态(0开启|-1停用|-2异常|-3维护)
|
|
InterfaceStatus int `json:"interface_status"` //接口状态(0开启|-1停用|-2异常|-3维护)
|
|
CallTimesLimitDay int `json:"call_times_limit_day"` //接口调用次数每日上限
|
|
CallTimesLimitDay int `json:"call_times_limit_day"` //接口调用次数每日上限
|
|
DataNumLimitOneTimes int `json:"data_num_limit_one_times"` //接口每次返回数据量上限
|
|
DataNumLimitOneTimes int `json:"data_num_limit_one_times"` //接口每次返回数据量上限
|
|
- UpdateAt time.Time `json:"-" gorm:"autoUpdateTime"`
|
|
|
|
|
|
+ UpdateAt time.Time `json:"-" gorm:"autoUpdateTime"` //更新时间
|
|
|
|
+ Discount int `json:"discount"` //用户产品折扣
|
|
}
|
|
}
|
|
|
|
|
|
func (p *UserProduct) TableName() string {
|
|
func (p *UserProduct) TableName() string {
|
|
@@ -42,16 +43,16 @@ type UserProductModel struct {
|
|
ID int `json:"id" gorm:"primaryKey"`
|
|
ID int `json:"id" gorm:"primaryKey"`
|
|
AppID string `json:"app_id"`
|
|
AppID string `json:"app_id"`
|
|
ProductID int `json:"product_id"`
|
|
ProductID int `json:"product_id"`
|
|
- CreateAt time.Time `json:"-" gorm:"autoCreateTime"` //标签autoCreateTime设置如果字段名字不为CreatAt时候自动插入当前时间
|
|
|
|
|
|
+ CreateAt time.Time `json:"-" gorm:"autoCreateTime"` //标签autoCreateTime设置如果字段名字不为CreatAt时候自动插入当前时间
|
|
CostModel int `json:"cost_model"` //扣费模式(0-按剩余量扣,1-按账户余额扣,2-优先扣剩余量,量为0扣余额)
|
|
CostModel int `json:"cost_model"` //扣费模式(0-按剩余量扣,1-按账户余额扣,2-优先扣剩余量,量为0扣余额)
|
|
LeftNum int `json:"left_num"` //剩余量 加锁处理
|
|
LeftNum int `json:"left_num"` //剩余量 加锁处理
|
|
InterfaceStatus int `json:"interface_status"` //接口状态(0开启|-1停用|-2异常|-3维护)
|
|
InterfaceStatus int `json:"interface_status"` //接口状态(0开启|-1停用|-2异常|-3维护)
|
|
CallTimesLimitDay int `json:"call_times_limit_day"` //接口调用次数每日上限
|
|
CallTimesLimitDay int `json:"call_times_limit_day"` //接口调用次数每日上限
|
|
DataNumLimitOneTimes int `json:"data_num_limit_one_times"` //接口每次返回数据量上限
|
|
DataNumLimitOneTimes int `json:"data_num_limit_one_times"` //接口每次返回数据量上限
|
|
- UpdateAt time.Time `json:"-" gorm:"autoUpdateTime"`
|
|
|
|
|
|
+ UpdateAt time.Time `json:"-" gorm:"autoUpdateTime"` //更新时间
|
|
|
|
+ Discount int `json:"discount"` //用户产品折扣
|
|
}
|
|
}
|
|
|
|
|
|
func (p *UserProductModel) TableName() string {
|
|
func (p *UserProductModel) TableName() string {
|
|
return "user_product"
|
|
return "user_product"
|
|
}
|
|
}
|
|
-
|
|
|