Use table name constant in Cols for type safety
This commit is contained in:
31
app/model/dbmodel/ps_feature_value.go
Normal file
31
app/model/dbmodel/ps_feature_value.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 TableNamePsFeatureValue = "ps_feature_value"
|
||||
|
||||
// PsFeatureValue mapped from table <ps_feature_value>
|
||||
type PsFeatureValue struct {
|
||||
IDFeatureValue int32 `gorm:"column:id_feature_value;primaryKey;autoIncrement:true" json:"id_feature_value"`
|
||||
IDFeature int32 `gorm:"column:id_feature;not null;index:feature,priority:1" json:"id_feature"`
|
||||
Custom *int32 `gorm:"column:custom" json:"custom"`
|
||||
}
|
||||
|
||||
// TableName PsFeatureValue's table name
|
||||
func (*PsFeatureValue) TableName() string {
|
||||
return TableNamePsFeatureValue
|
||||
}
|
||||
|
||||
var PsFeatureValueCols = struct {
|
||||
IDFeatureValue gormcol.Field
|
||||
IDFeature gormcol.Field
|
||||
Custom gormcol.Field
|
||||
}{
|
||||
IDFeatureValue: gormcol.Field{Table: TableNamePsFeatureValue, Column: "id_feature_value"},
|
||||
IDFeature: gormcol.Field{Table: TableNamePsFeatureValue, Column: "id_feature"},
|
||||
Custom: gormcol.Field{Table: TableNamePsFeatureValue, Column: "custom"},
|
||||
}
|
||||
Reference in New Issue
Block a user