package model type PageShop struct { ModelIDCULD Name string `orm:"size(255)" json:"name"` VendorID int `orm:"column(vendor_id)" json:"vendorID"` VendorStoreID string `orm:"column(vendor_store_id);size(48)" json:"vendorStoreID"` OrgCode string `orm:"size(255)" json:"orgCode"` VendorStatus string `orm:"size(48)" json:"vendorStatus"` Status int `json:"status"` // 取值同Store.Status CityCode int `orm:"default(0)" json:"cityCode"` // todo ? DistrictCode int `orm:"default(0)" json:"districtCode"` // todo ? Address string `orm:"size(255)" json:"address"` Lng float64 `orm:"digits(10);decimals(6)" json:"lng"` Lat float64 `orm:"digits(10);decimals(6)" json:"lat"` Tel1 string `orm:"size(32);index" json:"tel1"` Tel2 string `orm:"size(32);index" json:"tel2"` ShopScore float64 `orm:"digits(3);decimals(1)" json:"shopScore"` // 店铺评分 RecentOrderNum int `orm:"size(48)" json:"recentOrderNum"` // 月订单量 SkuCount int `orm:"size(48)" json:"skuCount"` // 商品总量 BusinessType string `orm:"size(48)" json:"businessType"` // 经营范围 LicenceCode string `orm:"size(32)" json:"licenceCode"` // 营业执照 LicenceImg string `orm:"size(255)" json:"licenceImg"` // 营业执照图片 } func (*PageShop) TableUnique() [][]string { return [][]string{ []string{"VendorStoreID", "VendorID"}, } } //各平台商品数据 type PageSku struct { ModelIDCUL VendorID int `orm:"column(vendor_id)" json:"vendorID"` VendorStoreID string `orm:"column(vendor_store_id)" json:"vendorStoreID"` VendorSkuID string `orm:"column(vendor_sku_id)" json:"vendorSkuID"` VendorSkuName string `json:"vendorSkuName"` MonthSaled int `json:"monthSaled"` ActPrice int `json:"actPrice"` SalePrice int `json:"salePrice"` Unit string `json:"unit"` } func (*PageSku) TableUnique() [][]string { return [][]string{ []string{"VendorID", "VendorStoreID", "VendorSkuID"}, } } func (*PageSku) TableIndex() [][]string { return [][]string{ []string{"MonthSaled", "SalePrice"}, } } //各平台门店数据 type PageStore struct { ModelIDCUL VendorID int `orm:"column(vendor_id)" json:"vendorID"` VendorStoreID string `orm:"column(vendor_store_id)" json:"vendorStoreID"` VendorStoreName string `json:"vendorStoreName"` Address string `json:"address"` CityName string `json:"cityName"` OrgCode string `json:"orgCode` Lng string `json:"lng"` Lat string `json:"lat"` } func (*PageStore) TableIndex() [][]string { return [][]string{ []string{"VendorID", "VendorStoreID"}, } } type PageBrand struct { ModelIDCUL BrandName string `json:"brandName"` } func (*PageBrand) TableIndex() [][]string { return [][]string{ []string{"BrandName"}, } }