Use table name constant in Cols for type safety
This commit is contained in:
40
app/model/dbmodel/ps_supplier_lang.go
Normal file
40
app/model/dbmodel/ps_supplier_lang.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 TableNamePsSupplierLang = "ps_supplier_lang"
|
||||
|
||||
// PsSupplierLang mapped from table <ps_supplier_lang>
|
||||
type PsSupplierLang struct {
|
||||
IDSupplier int32 `gorm:"column:id_supplier;primaryKey" json:"id_supplier"`
|
||||
IDLang int32 `gorm:"column:id_lang;primaryKey" json:"id_lang"`
|
||||
Description *string `gorm:"column:description" json:"description"`
|
||||
MetaTitle *string `gorm:"column:meta_title" json:"meta_title"`
|
||||
MetaKeywords *string `gorm:"column:meta_keywords" json:"meta_keywords"`
|
||||
MetaDescription *string `gorm:"column:meta_description" json:"meta_description"`
|
||||
}
|
||||
|
||||
// TableName PsSupplierLang's table name
|
||||
func (*PsSupplierLang) TableName() string {
|
||||
return TableNamePsSupplierLang
|
||||
}
|
||||
|
||||
var PsSupplierLangCols = struct {
|
||||
IDSupplier gormcol.Field
|
||||
IDLang gormcol.Field
|
||||
Description gormcol.Field
|
||||
MetaTitle gormcol.Field
|
||||
MetaKeywords gormcol.Field
|
||||
MetaDescription gormcol.Field
|
||||
}{
|
||||
IDSupplier: gormcol.Field{Table: TableNamePsSupplierLang, Column: "id_supplier"},
|
||||
IDLang: gormcol.Field{Table: TableNamePsSupplierLang, Column: "id_lang"},
|
||||
Description: gormcol.Field{Table: TableNamePsSupplierLang, Column: "description"},
|
||||
MetaTitle: gormcol.Field{Table: TableNamePsSupplierLang, Column: "meta_title"},
|
||||
MetaKeywords: gormcol.Field{Table: TableNamePsSupplierLang, Column: "meta_keywords"},
|
||||
MetaDescription: gormcol.Field{Table: TableNamePsSupplierLang, Column: "meta_description"},
|
||||
}
|
||||
Reference in New Issue
Block a user