Use table name constant in Cols for type safety
This commit is contained in:
40
app/model/dbmodel/ps_mailalert_customer_oos.go
Normal file
40
app/model/dbmodel/ps_mailalert_customer_oos.go
Normal file
@@ -0,0 +1,40 @@
|
||||
// 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"
|
||||
|
||||
const TableNamePsMailalertCustomerOo = "ps_mailalert_customer_oos"
|
||||
|
||||
// PsMailalertCustomerOo mapped from table <ps_mailalert_customer_oos>
|
||||
type PsMailalertCustomerOo struct {
|
||||
IDCustomer int32 `gorm:"column:id_customer;primaryKey" json:"id_customer"`
|
||||
CustomerEmail string `gorm:"column:customer_email;primaryKey" json:"customer_email"`
|
||||
IDProduct int32 `gorm:"column:id_product;primaryKey" json:"id_product"`
|
||||
IDProductAttribute int32 `gorm:"column:id_product_attribute;primaryKey" json:"id_product_attribute"`
|
||||
IDShop int32 `gorm:"column:id_shop;primaryKey" json:"id_shop"`
|
||||
IDLang int32 `gorm:"column:id_lang;not null" json:"id_lang"`
|
||||
}
|
||||
|
||||
// TableName PsMailalertCustomerOo's table name
|
||||
func (*PsMailalertCustomerOo) TableName() string {
|
||||
return TableNamePsMailalertCustomerOo
|
||||
}
|
||||
|
||||
var PsMailalertCustomerOoCols = struct {
|
||||
IDCustomer gormcol.Field
|
||||
CustomerEmail gormcol.Field
|
||||
IDProduct gormcol.Field
|
||||
IDProductAttribute gormcol.Field
|
||||
IDShop gormcol.Field
|
||||
IDLang gormcol.Field
|
||||
}{
|
||||
IDCustomer: gormcol.Field{Table: TableNamePsMailalertCustomerOo, Column: "id_customer"},
|
||||
CustomerEmail: gormcol.Field{Table: TableNamePsMailalertCustomerOo, Column: "customer_email"},
|
||||
IDProduct: gormcol.Field{Table: TableNamePsMailalertCustomerOo, Column: "id_product"},
|
||||
IDProductAttribute: gormcol.Field{Table: TableNamePsMailalertCustomerOo, Column: "id_product_attribute"},
|
||||
IDShop: gormcol.Field{Table: TableNamePsMailalertCustomerOo, Column: "id_shop"},
|
||||
IDLang: gormcol.Field{Table: TableNamePsMailalertCustomerOo, Column: "id_lang"},
|
||||
}
|
||||
Reference in New Issue
Block a user