Use table name constant in Cols for type safety
This commit is contained in:
31
app/model/dbmodel/ps_linksmenutop.go
Normal file
31
app/model/dbmodel/ps_linksmenutop.go
Normal file
@@ -0,0 +1,31 @@
|
||||
// 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 TableNamePsLinksmenutop = "ps_linksmenutop"
|
||||
|
||||
// PsLinksmenutop mapped from table <ps_linksmenutop>
|
||||
type PsLinksmenutop struct {
|
||||
IDLinksmenutop int32 `gorm:"column:id_linksmenutop;primaryKey;autoIncrement:true" json:"id_linksmenutop"`
|
||||
IDShop int32 `gorm:"column:id_shop;not null;index:id_shop,priority:1" json:"id_shop"`
|
||||
NewWindow bool `gorm:"column:new_window;not null" json:"new_window"`
|
||||
}
|
||||
|
||||
// TableName PsLinksmenutop's table name
|
||||
func (*PsLinksmenutop) TableName() string {
|
||||
return TableNamePsLinksmenutop
|
||||
}
|
||||
|
||||
var PsLinksmenutopCols = struct {
|
||||
IDLinksmenutop gormcol.Field
|
||||
IDShop gormcol.Field
|
||||
NewWindow gormcol.Field
|
||||
}{
|
||||
IDLinksmenutop: gormcol.Field{Table: TableNamePsLinksmenutop, Column: "id_linksmenutop"},
|
||||
IDShop: gormcol.Field{Table: TableNamePsLinksmenutop, Column: "id_shop"},
|
||||
NewWindow: gormcol.Field{Table: TableNamePsLinksmenutop, Column: "new_window"},
|
||||
}
|
||||
Reference in New Issue
Block a user