shanyici
This commit is contained in:
@@ -1,14 +0,0 @@
|
|||||||
package model
|
|
||||||
|
|
||||||
type FakeJdThingMap struct {
|
|
||||||
ModelIDCUL
|
|
||||||
JxID int `orm:"column(jx_id)" json:"jxID"`
|
|
||||||
ThingType int `json:"thingType"`
|
|
||||||
JdID int64 `orm:"column(jd_id);unique" json:"jdID"`
|
|
||||||
}
|
|
||||||
|
|
||||||
func (*FakeJdThingMap) TableUnique() [][]string {
|
|
||||||
return [][]string{
|
|
||||||
[]string{"JxID", "ThingType"},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,105 +0,0 @@
|
|||||||
package model
|
|
||||||
|
|
||||||
const (
|
|
||||||
RecipeActionCollect = 1 // 收藏
|
|
||||||
RecipeActionUpvote = 2 // 顶
|
|
||||||
RecipeActionDownvote = 4 // 踩
|
|
||||||
)
|
|
||||||
|
|
||||||
type FoodRecipe struct {
|
|
||||||
ModelIDCULD
|
|
||||||
|
|
||||||
Name string `orm:"size(48)" json:"name"`
|
|
||||||
AuthorID string `orm:"size(48);column(author_id);index" json:"authorID"`
|
|
||||||
|
|
||||||
Description string `orm:"size(4096)" json:"description"`
|
|
||||||
Img string `orm:"size(512)" json:"img"`
|
|
||||||
TimeInMinute int `json:"timeInMinute"` // 大约时间(分钟)
|
|
||||||
UpvoteCount int `json:"upvoteCount"`
|
|
||||||
DownvoteCount int `json:"downvoteCount"`
|
|
||||||
Score int `json:"score"` // 分数
|
|
||||||
|
|
||||||
TagCategory string `orm:"size(48)" json:"tagCategory"` // 菜系(川,粤,鲁等等)
|
|
||||||
TagCookType string `orm:"size(48)" json:"tagCookType"` // 制作工艺(煮,炒,蒸等等)
|
|
||||||
TagTaste string `orm:"size(48)" json:"tagTaste"` // 口味(辣,麻,甜)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (*FoodRecipe) TableUnique() [][]string {
|
|
||||||
return [][]string{
|
|
||||||
[]string{"Name", "AuthorID", "DeletedAt"},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 菜谱步骤
|
|
||||||
type FoodRecipeStep struct {
|
|
||||||
ModelIDCULD
|
|
||||||
|
|
||||||
RecipeID int `orm:"column(recipe_id)" json:"recipeID"`
|
|
||||||
Index int8 `json:"index"` // 步骤序号,从1开始
|
|
||||||
|
|
||||||
Name string `orm:"size(48)" json:"name"`
|
|
||||||
Description string `orm:"size(4096)" json:"description"`
|
|
||||||
Img string `orm:"size(512)" json:"img"`
|
|
||||||
}
|
|
||||||
|
|
||||||
func (*FoodRecipeStep) TableUnique() [][]string {
|
|
||||||
return [][]string{
|
|
||||||
[]string{"RecipeID", "Index", "DeletedAt"},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 菜谱配料
|
|
||||||
type FoodRecipeItem struct {
|
|
||||||
ModelIDCULD
|
|
||||||
|
|
||||||
RecipeID int `orm:"column(recipe_id)" json:"recipeID"`
|
|
||||||
Index int8 `json:"index"` // 配料序号,从1开始
|
|
||||||
|
|
||||||
Name string `orm:"size(48)" json:"name"`
|
|
||||||
|
|
||||||
// SpecQuality float32 `json:"specQuality"`
|
|
||||||
// SpecUnit string `orm:"size(8)" json:"specUnit"` // 质量或容量
|
|
||||||
}
|
|
||||||
|
|
||||||
func (*FoodRecipeItem) TableUnique() [][]string {
|
|
||||||
return [][]string{
|
|
||||||
[]string{"RecipeID", "Index", "DeletedAt"},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 菜谱配料选择
|
|
||||||
type FoodRecipeItemChoice struct {
|
|
||||||
ModelIDCULD
|
|
||||||
|
|
||||||
RecipeID int `orm:"column(recipe_id)" json:"recipeID"`
|
|
||||||
Index int8 `json:"index"` // 配料序号,从1开始
|
|
||||||
SkuID int `orm:"column(sku_id)" json:"skuID"`
|
|
||||||
|
|
||||||
ChoiceIndex int8 `json:"choiceIndex"` // 选择序号,从1开始
|
|
||||||
}
|
|
||||||
|
|
||||||
func (*FoodRecipeItemChoice) TableUnique() [][]string {
|
|
||||||
return [][]string{
|
|
||||||
[]string{"RecipeID", "Index", "SkuID", "DeletedAt"},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
type FoodRecipeUser struct {
|
|
||||||
ModelIDCULD
|
|
||||||
|
|
||||||
RecipeID int `orm:"column(recipe_id)" json:"recipeID"`
|
|
||||||
UserID string `orm:"size(48);column(user_id)" json:"userID" compact:"userID"`
|
|
||||||
ActionType int8 `json:"actionType"`
|
|
||||||
}
|
|
||||||
|
|
||||||
func (*FoodRecipeUser) TableUnique() [][]string {
|
|
||||||
return [][]string{
|
|
||||||
[]string{"RecipeID", "UserID", "DeletedAt"},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (*FoodRecipeUser) TableIndex() [][]string {
|
|
||||||
return [][]string{
|
|
||||||
[]string{"UserID", "RecipeID", "DeletedAt"},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,35 +0,0 @@
|
|||||||
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"},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
package model
|
|
||||||
|
|
||||||
import "time"
|
|
||||||
|
|
||||||
type TempGoodsOrderMobile struct {
|
|
||||||
ID int64 `orm:"column(id)" json:"-"`
|
|
||||||
VendorOrderID string `orm:"column(vendor_order_id);size(48)" json:"vendorOrderID"`
|
|
||||||
VendorID int `orm:"column(vendor_id)" json:"vendorID"`
|
|
||||||
AccountNo string `orm:"size(32)" json:"accountNo"`
|
|
||||||
OrderCreatedAt time.Time `orm:"type(datetime);index" json:"orderCreatedAt"` // 这里记录的是订单生效时间,即用户支付完成(货到付款即为下单时间)
|
|
||||||
CreatedAt time.Time `orm:"auto_now_add;type(datetime)" json:"createdAt"`
|
|
||||||
Mobile string `orm:"size(32);index" json:"mobile"`
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *TempGoodsOrderMobile) TableUnique() [][]string {
|
|
||||||
return [][]string{
|
|
||||||
[]string{"VendorOrderID", "VendorID"},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user