Use table name constant in Cols for type safety
This commit is contained in:
43
app/model/dbmodel/ps_homeslider_slides_lang.go
Normal file
43
app/model/dbmodel/ps_homeslider_slides_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 TableNamePsHomesliderSlidesLang = "ps_homeslider_slides_lang"
|
||||
|
||||
// PsHomesliderSlidesLang mapped from table <ps_homeslider_slides_lang>
|
||||
type PsHomesliderSlidesLang struct {
|
||||
IDHomesliderSlides int32 `gorm:"column:id_homeslider_slides;primaryKey" json:"id_homeslider_slides"`
|
||||
IDLang int32 `gorm:"column:id_lang;primaryKey" json:"id_lang"`
|
||||
Title string `gorm:"column:title;not null" json:"title"`
|
||||
Description string `gorm:"column:description;not null" json:"description"`
|
||||
Legend string `gorm:"column:legend;not null" json:"legend"`
|
||||
URL string `gorm:"column:url;not null" json:"url"`
|
||||
Image string `gorm:"column:image;not null" json:"image"`
|
||||
}
|
||||
|
||||
// TableName PsHomesliderSlidesLang's table name
|
||||
func (*PsHomesliderSlidesLang) TableName() string {
|
||||
return TableNamePsHomesliderSlidesLang
|
||||
}
|
||||
|
||||
var PsHomesliderSlidesLangCols = struct {
|
||||
IDHomesliderSlides gormcol.Field
|
||||
IDLang gormcol.Field
|
||||
Title gormcol.Field
|
||||
Description gormcol.Field
|
||||
Legend gormcol.Field
|
||||
URL gormcol.Field
|
||||
Image gormcol.Field
|
||||
}{
|
||||
IDHomesliderSlides: gormcol.Field{Table: TableNamePsHomesliderSlidesLang, Column: "id_homeslider_slides"},
|
||||
IDLang: gormcol.Field{Table: TableNamePsHomesliderSlidesLang, Column: "id_lang"},
|
||||
Title: gormcol.Field{Table: TableNamePsHomesliderSlidesLang, Column: "title"},
|
||||
Description: gormcol.Field{Table: TableNamePsHomesliderSlidesLang, Column: "description"},
|
||||
Legend: gormcol.Field{Table: TableNamePsHomesliderSlidesLang, Column: "legend"},
|
||||
URL: gormcol.Field{Table: TableNamePsHomesliderSlidesLang, Column: "url"},
|
||||
Image: gormcol.Field{Table: TableNamePsHomesliderSlidesLang, Column: "image"},
|
||||
}
|
||||
Reference in New Issue
Block a user