增加StoreScoreEx结构来获取门店名字,去掉表中的字段StoreName

This commit is contained in:
Rosy-zhudan
2019-09-10 15:42:26 +08:00
parent 69c57c6520
commit 40586e19a6
4 changed files with 70 additions and 53 deletions

View File

@@ -21,7 +21,6 @@ type StoreScore struct {
ID int `orm:"column(id)" json:"id"`
CreatedAt time.Time `orm:"auto_now_add;type(datetime)" json:"createdAt"`
StoreID int `orm:"column(store_id)" json:"storeID"`
StoreName string `orm:"column(store_name)" json:"storeName"`
StoreOpenTime int `orm:"column(store_open_time)" json:"storeOpenTime"`
SaleSkuCount int `orm:"column(sale_sku_count)" json:"saleSkuCount"`
@@ -35,8 +34,13 @@ type StoreScore struct {
SaleSkuPrice int `orm:"column(sale_sku_price)" json:"saleSkuPrice"`
}
type WeeklyStoreScore struct {
type StoreScoreEx struct {
StoreScore
StoreName string `json:"storeName"`
}
type WeeklyStoreScore struct {
StoreScoreEx
BeginTime time.Time `json:"beginTime"`
EndTime time.Time `json:"endTime"`
TotalScore int `json:"totalScore"`