Use table name constant in Cols for type safety
This commit is contained in:
31
app/model/dbmodel/ps_quick_access.go
Normal file
31
app/model/dbmodel/ps_quick_access.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 TableNamePsQuickAccess = "ps_quick_access"
|
||||
|
||||
// PsQuickAccess mapped from table <ps_quick_access>
|
||||
type PsQuickAccess struct {
|
||||
IDQuickAccess int32 `gorm:"column:id_quick_access;primaryKey;autoIncrement:true" json:"id_quick_access"`
|
||||
NewWindow bool `gorm:"column:new_window;not null" json:"new_window"`
|
||||
Link string `gorm:"column:link;not null" json:"link"`
|
||||
}
|
||||
|
||||
// TableName PsQuickAccess's table name
|
||||
func (*PsQuickAccess) TableName() string {
|
||||
return TableNamePsQuickAccess
|
||||
}
|
||||
|
||||
var PsQuickAccessCols = struct {
|
||||
IDQuickAccess gormcol.Field
|
||||
NewWindow gormcol.Field
|
||||
Link gormcol.Field
|
||||
}{
|
||||
IDQuickAccess: gormcol.Field{Table: TableNamePsQuickAccess, Column: "id_quick_access"},
|
||||
NewWindow: gormcol.Field{Table: TableNamePsQuickAccess, Column: "new_window"},
|
||||
Link: gormcol.Field{Table: TableNamePsQuickAccess, Column: "link"},
|
||||
}
|
||||
Reference in New Issue
Block a user