|
@@ -9,10 +9,44 @@ type User struct {
|
|
|
IpWhiteList string `json:"ip_white_list"`
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
func (user *User) TableName() string {
|
|
|
return "user"
|
|
|
}
|
|
|
|
|
|
+type UserAccount struct {
|
|
|
+ ID int `json:"id" gorm:"primaryKey"`
|
|
|
+ AppID string `json:"app_id"`
|
|
|
+ Money int `json:"money"`
|
|
|
+}
|
|
|
+
|
|
|
+func (p *UserAccount) TableName() string {
|
|
|
+ return "user_account"
|
|
|
+}
|
|
|
+
|
|
|
+type UserMoneyRecord struct {
|
|
|
+ ID int `json:"id" gorm:"primaryKey"`
|
|
|
+ AppID string `json:"app_id"`
|
|
|
+ Before int `json:"before"`
|
|
|
+ After int `json:"after"`
|
|
|
+ TradeMoney int `json:"tarde_money"`
|
|
|
+}
|
|
|
+
|
|
|
+func (p *UserMoneyRecord) TableName() string {
|
|
|
+ return "user_money_record"
|
|
|
+}
|
|
|
|
|
|
+type UserBuyRecord struct {
|
|
|
+ ID int `json:"id" gorm:"primaryKey"`
|
|
|
+ AppID string `json:"app_id"`
|
|
|
+ ProductId int `json:"product_id"`
|
|
|
+ UserProductId int `json:"user_product_id"`
|
|
|
+ Before int `json:"before"`
|
|
|
+ After int `json:"after"`
|
|
|
+ TradeMoney int `json:"tarde_money"`
|
|
|
+ BuyType int `json:"buy_type"`
|
|
|
+ HistoryUnitPrice int `json:"history_unit_price"`
|
|
|
+}
|
|
|
+
|
|
|
+func (p *UserBuyRecord) TableName() string {
|
|
|
+ return "user_buy_record"
|
|
|
+}
|