Use table name constant in Cols for type safety
This commit is contained in:
31
app/model/dbmodel/ps_required_field.go
Normal file
31
app/model/dbmodel/ps_required_field.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 TableNamePsRequiredField = "ps_required_field"
|
||||
|
||||
// PsRequiredField mapped from table <ps_required_field>
|
||||
type PsRequiredField struct {
|
||||
IDRequiredField int32 `gorm:"column:id_required_field;primaryKey;autoIncrement:true" json:"id_required_field"`
|
||||
ObjectName string `gorm:"column:object_name;not null;index:object_name,priority:1" json:"object_name"`
|
||||
FieldName string `gorm:"column:field_name;not null" json:"field_name"`
|
||||
}
|
||||
|
||||
// TableName PsRequiredField's table name
|
||||
func (*PsRequiredField) TableName() string {
|
||||
return TableNamePsRequiredField
|
||||
}
|
||||
|
||||
var PsRequiredFieldCols = struct {
|
||||
IDRequiredField gormcol.Field
|
||||
ObjectName gormcol.Field
|
||||
FieldName gormcol.Field
|
||||
}{
|
||||
IDRequiredField: gormcol.Field{Table: TableNamePsRequiredField, Column: "id_required_field"},
|
||||
ObjectName: gormcol.Field{Table: TableNamePsRequiredField, Column: "object_name"},
|
||||
FieldName: gormcol.Field{Table: TableNamePsRequiredField, Column: "field_name"},
|
||||
}
|
||||
Reference in New Issue
Block a user