Use table name constant in Cols for type safety
This commit is contained in:
28
app/model/dbmodel/ps_cart_rule_combination.go
Normal file
28
app/model/dbmodel/ps_cart_rule_combination.go
Normal file
@@ -0,0 +1,28 @@
|
||||
// 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 TableNamePsCartRuleCombination = "ps_cart_rule_combination"
|
||||
|
||||
// PsCartRuleCombination mapped from table <ps_cart_rule_combination>
|
||||
type PsCartRuleCombination struct {
|
||||
IDCartRule1 int32 `gorm:"column:id_cart_rule_1;primaryKey;index:id_cart_rule_1,priority:1" json:"id_cart_rule_1"`
|
||||
IDCartRule2 int32 `gorm:"column:id_cart_rule_2;primaryKey;index:id_cart_rule_2,priority:1" json:"id_cart_rule_2"`
|
||||
}
|
||||
|
||||
// TableName PsCartRuleCombination's table name
|
||||
func (*PsCartRuleCombination) TableName() string {
|
||||
return TableNamePsCartRuleCombination
|
||||
}
|
||||
|
||||
var PsCartRuleCombinationCols = struct {
|
||||
IDCartRule1 gormcol.Field
|
||||
IDCartRule2 gormcol.Field
|
||||
}{
|
||||
IDCartRule1: gormcol.Field{Table: TableNamePsCartRuleCombination, Column: "id_cart_rule_1"},
|
||||
IDCartRule2: gormcol.Field{Table: TableNamePsCartRuleCombination, Column: "id_cart_rule_2"},
|
||||
}
|
||||
Reference in New Issue
Block a user