From 20936ca4c89d609ac269c212de23a058186d5a3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Mon, 12 Oct 2020 17:14:32 +0800 Subject: [PATCH] shanyici --- business/model/fake_jd.go | 14 ----- business/model/food_recipe.go | 105 ---------------------------------- business/model/net_spider.go | 35 ------------ business/model/temp_model.go | 19 ------ 4 files changed, 173 deletions(-) delete mode 100644 business/model/fake_jd.go delete mode 100644 business/model/food_recipe.go delete mode 100644 business/model/net_spider.go delete mode 100644 business/model/temp_model.go diff --git a/business/model/fake_jd.go b/business/model/fake_jd.go deleted file mode 100644 index b57482f64..000000000 --- a/business/model/fake_jd.go +++ /dev/null @@ -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"}, - } -} diff --git a/business/model/food_recipe.go b/business/model/food_recipe.go deleted file mode 100644 index f9f79c203..000000000 --- a/business/model/food_recipe.go +++ /dev/null @@ -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"}, - } -} diff --git a/business/model/net_spider.go b/business/model/net_spider.go deleted file mode 100644 index 90612f38e..000000000 --- a/business/model/net_spider.go +++ /dev/null @@ -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"}, - } -} diff --git a/business/model/temp_model.go b/business/model/temp_model.go deleted file mode 100644 index 210359319..000000000 --- a/business/model/temp_model.go +++ /dev/null @@ -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"}, - } -}