Use table name constant in Cols for type safety
This commit is contained in:
61
app/model/dbmodel/ps_customer_thread.go
Normal file
61
app/model/dbmodel/ps_customer_thread.go
Normal file
@@ -0,0 +1,61 @@
|
||||
// Code generated by gorm.io/gen. DO NOT EDIT.
|
||||
// Code generated by gorm.io/gen. DO NOT EDIT.
|
||||
// Code generated by gorm.io/gen. DO NOT EDIT.
|
||||
|
||||
package dbmodel
|
||||
|
||||
import (
|
||||
"git.ma-al.com/goc_marek/gormcol"
|
||||
"time"
|
||||
)
|
||||
|
||||
const TableNamePsCustomerThread = "ps_customer_thread"
|
||||
|
||||
// PsCustomerThread mapped from table <ps_customer_thread>
|
||||
type PsCustomerThread struct {
|
||||
IDCustomerThread int32 `gorm:"column:id_customer_thread;primaryKey;autoIncrement:true" json:"id_customer_thread"`
|
||||
IDShop int32 `gorm:"column:id_shop;not null;index:id_shop,priority:1;default:1" json:"id_shop"`
|
||||
IDLang int32 `gorm:"column:id_lang;not null;index:id_lang,priority:1" json:"id_lang"`
|
||||
IDContact int32 `gorm:"column:id_contact;not null;index:id_contact,priority:1" json:"id_contact"`
|
||||
IDCustomer *int32 `gorm:"column:id_customer;index:id_customer,priority:1" json:"id_customer"`
|
||||
IDOrder *int32 `gorm:"column:id_order;index:id_order,priority:1" json:"id_order"`
|
||||
IDProduct *int32 `gorm:"column:id_product;index:id_product,priority:1" json:"id_product"`
|
||||
Status string `gorm:"column:status;not null;default:open" json:"status"`
|
||||
Email string `gorm:"column:email;not null" json:"email"`
|
||||
Token *string `gorm:"column:token" json:"token"`
|
||||
DateAdd time.Time `gorm:"column:date_add;not null" json:"date_add"`
|
||||
DateUpd time.Time `gorm:"column:date_upd;not null" json:"date_upd"`
|
||||
}
|
||||
|
||||
// TableName PsCustomerThread's table name
|
||||
func (*PsCustomerThread) TableName() string {
|
||||
return TableNamePsCustomerThread
|
||||
}
|
||||
|
||||
var PsCustomerThreadCols = struct {
|
||||
IDCustomerThread gormcol.Field
|
||||
IDShop gormcol.Field
|
||||
IDLang gormcol.Field
|
||||
IDContact gormcol.Field
|
||||
IDCustomer gormcol.Field
|
||||
IDOrder gormcol.Field
|
||||
IDProduct gormcol.Field
|
||||
Status gormcol.Field
|
||||
Email gormcol.Field
|
||||
Token gormcol.Field
|
||||
DateAdd gormcol.Field
|
||||
DateUpd gormcol.Field
|
||||
}{
|
||||
IDCustomerThread: gormcol.Field{Table: TableNamePsCustomerThread, Column: "id_customer_thread"},
|
||||
IDShop: gormcol.Field{Table: TableNamePsCustomerThread, Column: "id_shop"},
|
||||
IDLang: gormcol.Field{Table: TableNamePsCustomerThread, Column: "id_lang"},
|
||||
IDContact: gormcol.Field{Table: TableNamePsCustomerThread, Column: "id_contact"},
|
||||
IDCustomer: gormcol.Field{Table: TableNamePsCustomerThread, Column: "id_customer"},
|
||||
IDOrder: gormcol.Field{Table: TableNamePsCustomerThread, Column: "id_order"},
|
||||
IDProduct: gormcol.Field{Table: TableNamePsCustomerThread, Column: "id_product"},
|
||||
Status: gormcol.Field{Table: TableNamePsCustomerThread, Column: "status"},
|
||||
Email: gormcol.Field{Table: TableNamePsCustomerThread, Column: "email"},
|
||||
Token: gormcol.Field{Table: TableNamePsCustomerThread, Column: "token"},
|
||||
DateAdd: gormcol.Field{Table: TableNamePsCustomerThread, Column: "date_add"},
|
||||
DateUpd: gormcol.Field{Table: TableNamePsCustomerThread, Column: "date_upd"},
|
||||
}
|
||||
Reference in New Issue
Block a user