- remove useless legacy codes.

- refactor models
This commit is contained in:
gazebo
2018-10-16 10:47:44 +08:00
parent df19812e97
commit d7de24715b
39 changed files with 93 additions and 1248 deletions

View File

@@ -0,0 +1,12 @@
package legacymodel
import "time"
type BlackClient struct {
ID int `orm:"column(id)"`
Mobile string `orm:"size(16);unique"`
Name string `orm:"size(8)"`
Note string `orm:"size(256)"`
CreatedAt time.Time `orm:"auto_now_add;type(datetime);null"`
UpdatedAt time.Time `orm:"auto_now;type(datetime);null"`
}

View File

@@ -0,0 +1,8 @@
package legacymodel
type Config struct {
Id int
Thirdparty string `orm:"size(20);unique"`
Token string `orm:"size(300)"`
Date string `orm:"size(30)"`
}

View File

@@ -0,0 +1,20 @@
package legacymodel
type JxBackendUser struct {
UID int `orm:"pk;column(uid)"`
UName string `orm:"column(uname);size(64);index"`
UPass string `orm:"column(upass);size(64)"`
Tel string `orm:"size(32);index"`
Position string `orm:"size(255)"`
Enabled int8 `orm:"default(1)"`
SkuWidget int `orm:"default(0)"`
StoreWidget int `orm:"default(0)"`
UserWidget int `orm:"default(0)"`
BillinfoWidget int `orm:"default(0)"`
GroupWidget int `orm:"default(0)"`
CategoryWidget int `orm:"default(0)"`
}
func (*JxBackendUser) TableName() string {
return "jxbackenduser"
}

View File

@@ -1,38 +1,4 @@
package model
import "time"
type WeiXins struct {
ID int `orm:"column(id)" json:"id"`
JxStoreID int `orm:"column(jxstoreid)" json:"storeID"`
OpenID string `orm:"column(openid);size(70);unique;null" json:"openID"`
Tel string `orm:"size(15);unique" json:"tel"`
ParentID int `orm:"column(parentid);default(-1)" json:"parentID"`
NickName string `orm:"column(nickname);size(30)" json:"nickname"`
}
func (*WeiXins) TableName() string {
return "weixins"
}
type JxBackendUser struct {
UID int `orm:"pk;column(uid)"`
UName string `orm:"column(uname);size(64);index"`
UPass string `orm:"column(upass);size(64)"`
Tel string `orm:"size(32);index"`
Position string `orm:"size(255)"`
Enabled int8 `orm:"default(1)"`
SkuWidget int `orm:"default(0)"`
StoreWidget int `orm:"default(0)"`
UserWidget int `orm:"default(0)"`
BillinfoWidget int `orm:"default(0)"`
GroupWidget int `orm:"default(0)"`
CategoryWidget int `orm:"default(0)"`
}
func (*JxBackendUser) TableName() string {
return "jxbackenduser"
}
package legacymodel
type JxBadComments struct {
Id int `json:"id" orm:"column(id)"`
@@ -58,21 +24,3 @@ type JxBadComments struct {
func (*JxBadComments) TableName() string {
return "jx_bad_comments"
}
type StoreBill struct {
Id int `orm:"column(id);auto"`
Date time.Time `orm:"column(date);type(datetime)"`
Url string `orm:"column(url);size(255)"`
StoreId int `orm:"column(store_id)"`
BillName string `orm:"column(bill_name);size(30)"`
}
func (t *StoreBill) TableName() string {
return "store_bill"
}
func (*StoreBill) TableIndex() [][]string {
return [][]string{
[]string{"StoreId", "Date"},
}
}

View File

@@ -0,0 +1,20 @@
package legacymodel
type Jxstorefeature struct {
Id int `orm:"column(storeid);pk"`
Autopickup int8 `orm:"column(autopickup);null"`
JdDeliveryType int8 `orm:"column(jd_delivery_type);default(0)"` // 京东店的配送方式
ElmDeliveryType int8 `orm:"column(elm_delivery_type);default(0)"` // 饿了么店的配送方式
JdCompetition int8 `orm:"default(1)"` // 京东门店是否支持3方配送
ElmCompetition int8 `orm:"default(0)"` // 饿了么门店是否支持3方配送
SupportMtps int8 `orm:"default(1)"` // 是否支持美团配送
SupportDada int8 `orm:"default(0)"` // 是否支持达达
SupportFengNiao int8 `orm:"default(0)"` // 是否支持蜂鸟
// Transmtzs int8 `orm:"column(transmtzs);null"` // 不用了
// Deliverycompetition int8 `orm:"column(deliverycompetition);null"` // 不用了
}
func (t *Jxstorefeature) TableName() string {
return "jxstorefeature"
}

View File

@@ -0,0 +1,21 @@
package legacymodel
import "time"
type StoreBill struct {
Id int `orm:"column(id);auto"`
Date time.Time `orm:"column(date);type(datetime)"`
Url string `orm:"column(url);size(255)"`
StoreId int `orm:"column(store_id)"`
BillName string `orm:"column(bill_name);size(30)"`
}
func (t *StoreBill) TableName() string {
return "store_bill"
}
func (*StoreBill) TableIndex() [][]string {
return [][]string{
[]string{"StoreId", "Date"},
}
}

View File

@@ -0,0 +1,9 @@
package legacymodel
type TempLog struct {
ID int64 `orm:"column(id)"`
VendorOrderID string `orm:"column(vendor_order_id);size(48);index"`
RefVendorOrderID string `orm:"column(ref_vendor_order_id);size(48);index"`
IntValue1 int64
Msg string `orm:"type(text)"`
}

View File

@@ -0,0 +1,14 @@
package legacymodel
type WeiXins struct {
ID int `orm:"column(id)" json:"id"`
JxStoreID int `orm:"column(jxstoreid)" json:"storeID"`
OpenID string `orm:"column(openid);size(70);unique;null" json:"openID"`
Tel string `orm:"size(15);unique" json:"tel"`
ParentID int `orm:"column(parentid);default(-1)" json:"parentID"`
NickName string `orm:"column(nickname);size(30)" json:"nickname"`
}
func (*WeiXins) TableName() string {
return "weixins"
}

View File

@@ -0,0 +1,17 @@
package legacymodel
import "git.rosy.net.cn/jx-callback/globals"
type Elemeorder2 struct {
Id int `orm:"column(id);auto"`
Orderid string `orm:"column(orderid);size(50);null;unique"`
Data string `orm:"column(data);null"`
Type int `orm:"column(type);null"`
Consignee string `orm:"column(consignee);size(32)"`
Mobile string `orm:"column(mobile);size(32)"`
OrderCreatedAt string `orm:"column(order_created_at);size(50);index"`
}
func (t *Elemeorder2) TableName() string {
return globals.ElemeorderTableName
}

View File

@@ -0,0 +1,21 @@
package legacymodel
import (
"git.rosy.net.cn/jx-callback/globals"
)
type Jdorder2 struct {
Id int `orm:"column(id);auto"`
Code string `orm:"column(code);size(2);null"`
Msg string `orm:"column(msg);size(100);null"`
Data string `orm:"column(data);null"`
Success int8 `orm:"column(success);null"`
Jdorderid int64 `orm:"column(jdorderid);null;unique"`
Cityname string `orm:"column(cityname);size(20);null"`
Orderstatus int `orm:"column(orderstatus);null"`
Orderstatustime string `orm:"column(orderstatustime);size(50);null;index"`
}
func (t *Jdorder2) TableName() string {
return globals.JdorderTableName
}

View File

@@ -0,0 +1,61 @@
package legacymodel
import "git.rosy.net.cn/jx-callback/globals"
type Jxorder2 struct {
Id int `orm:"column(id);auto"`
VenderId int8 `orm:"column(vender_id);null"`
OrderId int64 `orm:"column(order_id);null;unique"`
JxStoreId string `orm:"column(jx_store_id);size(20);null"`
JxStoreName string `orm:"column(jx_store_name);size(100);null"`
OrderNum int `orm:"column(order_num);null"`
OrderStatus int8 `orm:"column(order_status);null"`
OrderStatusTime string `orm:"column(order_status_time);size(50);null"`
BusinessTag string `orm:"column(business_tag);size(100);null"`
SkuCount int `orm:"column(sku_count);null"`
OrderBuyerRemark string `orm:"column(order_buyer_remark);size(500);null"`
BuyerFullName string `orm:"column(buyer_full_name);size(100);null"`
BuyerFullAddress string `orm:"column(buyer_full_address);size(500);null"`
BuyerMobile string `orm:"column(buyer_mobile);size(100);null"`
BuyerCoordType int `orm:"column(buyer_coord_type);null"`
BuyerLng float64 `orm:"column(buyer_lng);null"`
BuyerLat float64 `orm:"column(buyer_lat);null"`
StoreLng float64 `orm:"column(store_lng);null;default(-1)"`
StoreLat float64 `orm:"column(store_lat);null;default(-1)"`
DeliveryPackageWeight float64 `orm:"column(delivery_package_weight);null"`
DeliveryCarrierNo string `orm:"column(delivery_carrier_no);size(20);null"`
DeliveryCarrierName string `orm:"column(delivery_carrier_name);size(100);null"`
DeliveryManNo string `orm:"column(delivery_man_no);size(20);null"`
DeliveryManName string `orm:"column(delivery_man_name);size(20);null"`
DeliveryManPhone string `orm:"column(delivery_man_phone);size(20);null"`
DeliveryBillNo string `orm:"column(delivery_bill_no);size(100);null"`
DeliveryStatus int8 `orm:"column(delivery_status);null"`
DeliveryConfirmTime string `orm:"column(delivery_confirm_time);size(50);null"`
AdjustIsExists int8 `orm:"column(adjust_is_exists);null"`
AdjustId int64 `orm:"column(adjust_id);null"`
OrderTotalMoney int `orm:"column(order_total_money);null"`
OrderDiscountMoney int `orm:"column(order_discount_money);null"`
OrderPlatDiscount int `orm:"column(order_plat_discount);null"`
OrderVenderDiscount int `orm:"column(order_vender_discount);null"`
OrderBuyerPayableMoney int `orm:"column(order_buyer_payable_money);null"`
OrderReceivableFreight int `orm:"column(order_receivable_freight);null"`
PlatFreightDis int `orm:"column(plat_freight_dis);null"`
VenderFreightDis int `orm:"column(vender_freight_dis);null"`
Tips int `orm:"column(tips);null"`
Percentage float64 `orm:"column(percentage);null"`
Allowance int `orm:"column(allowance);null"`
CityName string `orm:"column(city_name);size(20);null"`
OrderStartTime string `orm:"column(order_start_time);size(50);null"`
OrderPreEndDelivTime string `orm:"column(order_pre_end_deliv_time);size(50);null"`
OrderEndTime string `orm:"column(order_end_time);size(50);null"`
JdStoreId string `orm:"column(jd_store_id);size(20);null"`
DeliveryPrice float64 `orm:"column(delivery_price);null;digits(6);decimals(2);default(0.00)"`
DeliveryPrice1 float64 `orm:"column(delivery_price1);null;digits(6);decimals(2);default(0.00)"`
DeliveryStartTime string `orm:"column(delivery_start_time);size(50);null"`
DeliveryFinishTime string `orm:"column(delivery_finish_time);size(50);null"`
IsRecallDelivery int `orm:"column(is_recall_delivery);default(0);null"`
}
func (t *Jxorder2) TableName() string {
return globals.JxorderTableName
}

View File

@@ -0,0 +1,23 @@
package legacymodel
import "git.rosy.net.cn/jx-callback/globals"
type Jxordersku2 struct {
Id int `orm:"column(id);auto"`
VenderId int8 `orm:"column(vender_id);null"`
OrderId int64 `orm:"column(order_id);null"`
JxSkuId int `orm:"column(jx_sku_id);null"`
SkuName string `orm:"column(sku_name);size(200);null"`
JxStoreId int `orm:"column(jx_store_id);null"`
SkuPrice int `orm:"column(sku_price);null"`
SkuCount int `orm:"column(sku_count);null"`
IsGift int8 `orm:"column(is_gift);null"`
PromotionType int `orm:"column(promotion_type);null"`
SkuPlatDiscount int `orm:"column(sku_plat_discount);null"`
SkuVenderDiscount int `orm:"column(sku_vender_discount);null"`
SkuImg string `orm:"column(sku_img);size(120);null"`
}
func (t *Jxordersku2) TableName() string {
return globals.JxorderskuTableName
}