From 4266a5b0b9d9c8259236a8ec25349b2b585ceb18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Fri, 19 Aug 2022 17:31:06 +0800 Subject: [PATCH] 1 --- business/model/print_bind_store.go | 18 +++++++++--------- business/model/print_setting.go | 2 +- business/model/print_temp.go | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/business/model/print_bind_store.go b/business/model/print_bind_store.go index fec202072..6276212d4 100644 --- a/business/model/print_bind_store.go +++ b/business/model/print_bind_store.go @@ -4,15 +4,15 @@ import "time" type PrintBindStore struct { ID int `orm:"column(id)" json:"id" db:"id"` - CreatedAt time.Time `orm:"type(datetime)" json:"created_at" db:"created_at"` // 创建时间 - UpdatedAt time.Time `orm:"type(datetime)" json:"updated_at" db:"updated_at"` // 更新时间 - StoreID int64 `orm:"type(int);size(11)" json:"store_id" db:"store_id"` // 门店id(为京西创建门店id)唯一 - StoreName string `orm:"type(varchar);size(255)" json:"store_name" db:"store_name"` // 门店名称 - StoreVendor int `orm:"type(int);size(2)" json:"store_vendor" db:"store_vendor"` // 门店平台 - PrintNo string `orm:"type(varchar);size(32);index" json:"print_no" db:"print_no"` // 打印机编号 - UserId string `orm:"type(varchar);size(125)" json:"user_id" db:"user_id"` // 打印机所属用户 - StoreStatus int `orm:"type(int);size(2)" json:"store_status" db:"store_status"` // 门店状态 - BindStatus int `orm:"type(int);size(2)" json:"bind_status" db:"bind_status"` // 绑定状态 + CreatedAt time.Time `orm:"type(datetime)" json:"created_at" db:"created_at"` // 创建时间 + UpdatedAt time.Time `orm:"type(datetime)" json:"updated_at" db:"updated_at"` // 更新时间 + StoreID int64 `orm:"column(store_id);type(int);size(11)" json:"store_id" db:"store_id"` // 门店id(为京西创建门店id)唯一 + StoreName string `orm:"type(varchar);size(255)" json:"store_name" db:"store_name"` // 门店名称 + StoreVendor int `orm:"type(int);size(2)" json:"store_vendor" db:"store_vendor"` // 门店平台 + PrintNo string `orm:"type(varchar);size(32);index" json:"print_no" db:"print_no"` // 打印机编号 + UserId string `orm:"type(varchar);size(125)" json:"user_id" db:"user_id"` // 打印机所属用户 + StoreStatus int `orm:"type(int);size(2)" json:"store_status" db:"store_status"` // 门店状态 + BindStatus int `orm:"type(int);size(2)" json:"bind_status" db:"bind_status"` // 绑定状态 } func (v *PrintBindStore) TableUnique() [][]string { diff --git a/business/model/print_setting.go b/business/model/print_setting.go index 66b05db45..f9fc4f2ab 100644 --- a/business/model/print_setting.go +++ b/business/model/print_setting.go @@ -7,7 +7,7 @@ import ( // PrintSetting 打印机设置 type PrintSetting struct { - ID int `json:"id" db:"id"` + ID int `orm:"column(id)" json:"id" db:"id"` CreatedAt time.Time `json:"created_at" db:"created_at"` UpdatedAt time.Time `json:"updated_at" db:"updated_at"` DeletedAt time.Time `json:"deleted_at" db:"deleted_at"` diff --git a/business/model/print_temp.go b/business/model/print_temp.go index c03a11a25..52e414fdc 100644 --- a/business/model/print_temp.go +++ b/business/model/print_temp.go @@ -5,7 +5,7 @@ import ( ) type SystemTemp struct { - ID int `json:"id" db:"id"` + ID int `orm:"column(id)" json:"id" db:"id"` CreatedAt *time.Time `json:"created_at" db:"created_at"` UpdatedAt *time.Time `json:"updated_at" db:"updated_at"` LastOperator string `json:"last_operator" db:"last_operator"`