Use table name constant in Cols for type safety
This commit is contained in:
43
app/model/dbmodel/ps_maal_cms_page.go
Normal file
43
app/model/dbmodel/ps_maal_cms_page.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"
|
||||
"time"
|
||||
)
|
||||
|
||||
const TableNamePsMaalCmsPage = "ps_maal_cms_page"
|
||||
|
||||
// PsMaalCmsPage mapped from table <ps_maal_cms_page>
|
||||
type PsMaalCmsPage struct {
|
||||
IDPage int32 `gorm:"column:id_page;primaryKey;autoIncrement:true" json:"id_page"`
|
||||
IDCategory *int32 `gorm:"column:id_category" json:"id_category"`
|
||||
DateAdd *time.Time `gorm:"column:date_add" json:"date_add"`
|
||||
DateUpd *time.Time `gorm:"column:date_upd" json:"date_upd"`
|
||||
Content *string `gorm:"column:content" json:"content"`
|
||||
Jumbotron *string `gorm:"column:jumbotron" json:"jumbotron"`
|
||||
}
|
||||
|
||||
// TableName PsMaalCmsPage's table name
|
||||
func (*PsMaalCmsPage) TableName() string {
|
||||
return TableNamePsMaalCmsPage
|
||||
}
|
||||
|
||||
var PsMaalCmsPageCols = struct {
|
||||
IDPage gormcol.Field
|
||||
IDCategory gormcol.Field
|
||||
DateAdd gormcol.Field
|
||||
DateUpd gormcol.Field
|
||||
Content gormcol.Field
|
||||
Jumbotron gormcol.Field
|
||||
}{
|
||||
IDPage: gormcol.Field{Table: TableNamePsMaalCmsPage, Column: "id_page"},
|
||||
IDCategory: gormcol.Field{Table: TableNamePsMaalCmsPage, Column: "id_category"},
|
||||
DateAdd: gormcol.Field{Table: TableNamePsMaalCmsPage, Column: "date_add"},
|
||||
DateUpd: gormcol.Field{Table: TableNamePsMaalCmsPage, Column: "date_upd"},
|
||||
Content: gormcol.Field{Table: TableNamePsMaalCmsPage, Column: "content"},
|
||||
Jumbotron: gormcol.Field{Table: TableNamePsMaalCmsPage, Column: "jumbotron"},
|
||||
}
|
||||
Reference in New Issue
Block a user