Use table name constant in Cols for type safety
This commit is contained in:
34
app/model/dbmodel/ps_customization_field_lang.go
Normal file
34
app/model/dbmodel/ps_customization_field_lang.go
Normal file
@@ -0,0 +1,34 @@
|
||||
// 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 TableNamePsCustomizationFieldLang = "ps_customization_field_lang"
|
||||
|
||||
// PsCustomizationFieldLang mapped from table <ps_customization_field_lang>
|
||||
type PsCustomizationFieldLang struct {
|
||||
IDCustomizationField int32 `gorm:"column:id_customization_field;primaryKey" json:"id_customization_field"`
|
||||
IDLang int32 `gorm:"column:id_lang;primaryKey" json:"id_lang"`
|
||||
IDShop int32 `gorm:"column:id_shop;primaryKey;default:1" json:"id_shop"`
|
||||
Name string `gorm:"column:name;not null" json:"name"`
|
||||
}
|
||||
|
||||
// TableName PsCustomizationFieldLang's table name
|
||||
func (*PsCustomizationFieldLang) TableName() string {
|
||||
return TableNamePsCustomizationFieldLang
|
||||
}
|
||||
|
||||
var PsCustomizationFieldLangCols = struct {
|
||||
IDCustomizationField gormcol.Field
|
||||
IDLang gormcol.Field
|
||||
IDShop gormcol.Field
|
||||
Name gormcol.Field
|
||||
}{
|
||||
IDCustomizationField: gormcol.Field{Table: TableNamePsCustomizationFieldLang, Column: "id_customization_field"},
|
||||
IDLang: gormcol.Field{Table: TableNamePsCustomizationFieldLang, Column: "id_lang"},
|
||||
IDShop: gormcol.Field{Table: TableNamePsCustomizationFieldLang, Column: "id_shop"},
|
||||
Name: gormcol.Field{Table: TableNamePsCustomizationFieldLang, Column: "name"},
|
||||
}
|
||||
Reference in New Issue
Block a user