Use table name constant in Cols for type safety
This commit is contained in:
46
app/model/dbmodel/ps_maal_events.go
Normal file
46
app/model/dbmodel/ps_maal_events.go
Normal file
@@ -0,0 +1,46 @@
|
||||
// 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 TableNamePsMaalEvent = "ps_maal_events"
|
||||
|
||||
// PsMaalEvent mapped from table <ps_maal_events>
|
||||
type PsMaalEvent struct {
|
||||
IDEvent int32 `gorm:"column:id_event;primaryKey;autoIncrement:true" json:"id_event"`
|
||||
Gallery *string `gorm:"column:gallery" json:"gallery"`
|
||||
PostImg *string `gorm:"column:post_img" json:"post_img"`
|
||||
Position *int32 `gorm:"column:position" json:"position"`
|
||||
Active *int32 `gorm:"column:active" json:"active"`
|
||||
DateAdd *time.Time `gorm:"column:date_add" json:"date_add"`
|
||||
DateUpd *time.Time `gorm:"column:date_upd" json:"date_upd"`
|
||||
}
|
||||
|
||||
// TableName PsMaalEvent's table name
|
||||
func (*PsMaalEvent) TableName() string {
|
||||
return TableNamePsMaalEvent
|
||||
}
|
||||
|
||||
var PsMaalEventCols = struct {
|
||||
IDEvent gormcol.Field
|
||||
Gallery gormcol.Field
|
||||
PostImg gormcol.Field
|
||||
Position gormcol.Field
|
||||
Active gormcol.Field
|
||||
DateAdd gormcol.Field
|
||||
DateUpd gormcol.Field
|
||||
}{
|
||||
IDEvent: gormcol.Field{Table: TableNamePsMaalEvent, Column: "id_event"},
|
||||
Gallery: gormcol.Field{Table: TableNamePsMaalEvent, Column: "gallery"},
|
||||
PostImg: gormcol.Field{Table: TableNamePsMaalEvent, Column: "post_img"},
|
||||
Position: gormcol.Field{Table: TableNamePsMaalEvent, Column: "position"},
|
||||
Active: gormcol.Field{Table: TableNamePsMaalEvent, Column: "active"},
|
||||
DateAdd: gormcol.Field{Table: TableNamePsMaalEvent, Column: "date_add"},
|
||||
DateUpd: gormcol.Field{Table: TableNamePsMaalEvent, Column: "date_upd"},
|
||||
}
|
||||
Reference in New Issue
Block a user