Use table name constant in Cols for type safety
This commit is contained in:
43
app/model/dbmodel/ps_store_lang.go
Normal file
43
app/model/dbmodel/ps_store_lang.go
Normal file
@@ -0,0 +1,43 @@
|
||||
// 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 TableNamePsStoreLang = "ps_store_lang"
|
||||
|
||||
// PsStoreLang mapped from table <ps_store_lang>
|
||||
type PsStoreLang struct {
|
||||
IDStore int32 `gorm:"column:id_store;primaryKey" json:"id_store"`
|
||||
IDLang int32 `gorm:"column:id_lang;primaryKey" json:"id_lang"`
|
||||
Name string `gorm:"column:name;not null" json:"name"`
|
||||
Address1 string `gorm:"column:address1;not null" json:"address1"`
|
||||
Address2 *string `gorm:"column:address2" json:"address2"`
|
||||
Hours *string `gorm:"column:hours" json:"hours"`
|
||||
Note *string `gorm:"column:note" json:"note"`
|
||||
}
|
||||
|
||||
// TableName PsStoreLang's table name
|
||||
func (*PsStoreLang) TableName() string {
|
||||
return TableNamePsStoreLang
|
||||
}
|
||||
|
||||
var PsStoreLangCols = struct {
|
||||
IDStore gormcol.Field
|
||||
IDLang gormcol.Field
|
||||
Name gormcol.Field
|
||||
Address1 gormcol.Field
|
||||
Address2 gormcol.Field
|
||||
Hours gormcol.Field
|
||||
Note gormcol.Field
|
||||
}{
|
||||
IDStore: gormcol.Field{Table: TableNamePsStoreLang, Column: "id_store"},
|
||||
IDLang: gormcol.Field{Table: TableNamePsStoreLang, Column: "id_lang"},
|
||||
Name: gormcol.Field{Table: TableNamePsStoreLang, Column: "name"},
|
||||
Address1: gormcol.Field{Table: TableNamePsStoreLang, Column: "address1"},
|
||||
Address2: gormcol.Field{Table: TableNamePsStoreLang, Column: "address2"},
|
||||
Hours: gormcol.Field{Table: TableNamePsStoreLang, Column: "hours"},
|
||||
Note: gormcol.Field{Table: TableNamePsStoreLang, Column: "note"},
|
||||
}
|
||||
Reference in New Issue
Block a user