Use table name constant in Cols for type safety
This commit is contained in:
61
app/model/dbmodel/ps_condition.go
Normal file
61
app/model/dbmodel/ps_condition.go
Normal file
@@ -0,0 +1,61 @@
|
||||
// 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 TableNamePsCondition = "ps_condition"
|
||||
|
||||
// PsCondition mapped from table <ps_condition>
|
||||
type PsCondition struct {
|
||||
IDCondition int32 `gorm:"column:id_condition;primaryKey;autoIncrement:true" json:"id_condition"`
|
||||
IDPsCondition int32 `gorm:"column:id_ps_condition;primaryKey" json:"id_ps_condition"`
|
||||
Type string `gorm:"column:type;not null" json:"type"`
|
||||
Request *string `gorm:"column:request" json:"request"`
|
||||
Operator *string `gorm:"column:operator" json:"operator"`
|
||||
Value *string `gorm:"column:value" json:"value"`
|
||||
Result *string `gorm:"column:result" json:"result"`
|
||||
CalculationType *string `gorm:"column:calculation_type" json:"calculation_type"`
|
||||
CalculationDetail *string `gorm:"column:calculation_detail" json:"calculation_detail"`
|
||||
Validated bool `gorm:"column:validated;not null" json:"validated"`
|
||||
DateAdd time.Time `gorm:"column:date_add;not null" json:"date_add"`
|
||||
DateUpd time.Time `gorm:"column:date_upd;not null" json:"date_upd"`
|
||||
}
|
||||
|
||||
// TableName PsCondition's table name
|
||||
func (*PsCondition) TableName() string {
|
||||
return TableNamePsCondition
|
||||
}
|
||||
|
||||
var PsConditionCols = struct {
|
||||
IDCondition gormcol.Field
|
||||
IDPsCondition gormcol.Field
|
||||
Type gormcol.Field
|
||||
Request gormcol.Field
|
||||
Operator gormcol.Field
|
||||
Value gormcol.Field
|
||||
Result gormcol.Field
|
||||
CalculationType gormcol.Field
|
||||
CalculationDetail gormcol.Field
|
||||
Validated gormcol.Field
|
||||
DateAdd gormcol.Field
|
||||
DateUpd gormcol.Field
|
||||
}{
|
||||
IDCondition: gormcol.Field{Table: TableNamePsCondition, Column: "id_condition"},
|
||||
IDPsCondition: gormcol.Field{Table: TableNamePsCondition, Column: "id_ps_condition"},
|
||||
Type: gormcol.Field{Table: TableNamePsCondition, Column: "type"},
|
||||
Request: gormcol.Field{Table: TableNamePsCondition, Column: "request"},
|
||||
Operator: gormcol.Field{Table: TableNamePsCondition, Column: "operator"},
|
||||
Value: gormcol.Field{Table: TableNamePsCondition, Column: "value"},
|
||||
Result: gormcol.Field{Table: TableNamePsCondition, Column: "result"},
|
||||
CalculationType: gormcol.Field{Table: TableNamePsCondition, Column: "calculation_type"},
|
||||
CalculationDetail: gormcol.Field{Table: TableNamePsCondition, Column: "calculation_detail"},
|
||||
Validated: gormcol.Field{Table: TableNamePsCondition, Column: "validated"},
|
||||
DateAdd: gormcol.Field{Table: TableNamePsCondition, Column: "date_add"},
|
||||
DateUpd: gormcol.Field{Table: TableNamePsCondition, Column: "date_upd"},
|
||||
}
|
||||
Reference in New Issue
Block a user