Use table name constant in Cols for type safety
This commit is contained in:
31
app/model/dbmodel/ps_condition_advice.go
Normal file
31
app/model/dbmodel/ps_condition_advice.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 TableNamePsConditionAdvice = "ps_condition_advice"
|
||||
|
||||
// PsConditionAdvice mapped from table <ps_condition_advice>
|
||||
type PsConditionAdvice struct {
|
||||
IDCondition int32 `gorm:"column:id_condition;primaryKey" json:"id_condition"`
|
||||
IDAdvice int32 `gorm:"column:id_advice;primaryKey" json:"id_advice"`
|
||||
Display bool `gorm:"column:display;not null" json:"display"`
|
||||
}
|
||||
|
||||
// TableName PsConditionAdvice's table name
|
||||
func (*PsConditionAdvice) TableName() string {
|
||||
return TableNamePsConditionAdvice
|
||||
}
|
||||
|
||||
var PsConditionAdviceCols = struct {
|
||||
IDCondition gormcol.Field
|
||||
IDAdvice gormcol.Field
|
||||
Display gormcol.Field
|
||||
}{
|
||||
IDCondition: gormcol.Field{Table: TableNamePsConditionAdvice, Column: "id_condition"},
|
||||
IDAdvice: gormcol.Field{Table: TableNamePsConditionAdvice, Column: "id_advice"},
|
||||
Display: gormcol.Field{Table: TableNamePsConditionAdvice, Column: "display"},
|
||||
}
|
||||
Reference in New Issue
Block a user