Use table name constant in Cols for type safety
This commit is contained in:
49
app/model/dbmodel/ps_customization.go
Normal file
49
app/model/dbmodel/ps_customization.go
Normal file
@@ -0,0 +1,49 @@
|
||||
// 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 TableNamePsCustomization = "ps_customization"
|
||||
|
||||
// PsCustomization mapped from table <ps_customization>
|
||||
type PsCustomization struct {
|
||||
IDCustomization int32 `gorm:"column:id_customization;primaryKey;autoIncrement:true" json:"id_customization"`
|
||||
IDProductAttribute int32 `gorm:"column:id_product_attribute;not null;index:id_cart_product,priority:3;index:id_product_attribute,priority:1" json:"id_product_attribute"`
|
||||
IDAddressDelivery int32 `gorm:"column:id_address_delivery;primaryKey" json:"id_address_delivery"`
|
||||
IDCart int32 `gorm:"column:id_cart;primaryKey;index:id_cart_product,priority:1" json:"id_cart"`
|
||||
IDProduct int32 `gorm:"column:id_product;primaryKey;index:id_cart_product,priority:2" json:"id_product"`
|
||||
Quantity int32 `gorm:"column:quantity;not null" json:"quantity"`
|
||||
QuantityRefunded int32 `gorm:"column:quantity_refunded;not null" json:"quantity_refunded"`
|
||||
QuantityReturned int32 `gorm:"column:quantity_returned;not null" json:"quantity_returned"`
|
||||
InCart bool `gorm:"column:in_cart;not null" json:"in_cart"`
|
||||
}
|
||||
|
||||
// TableName PsCustomization's table name
|
||||
func (*PsCustomization) TableName() string {
|
||||
return TableNamePsCustomization
|
||||
}
|
||||
|
||||
var PsCustomizationCols = struct {
|
||||
IDCustomization gormcol.Field
|
||||
IDProductAttribute gormcol.Field
|
||||
IDAddressDelivery gormcol.Field
|
||||
IDCart gormcol.Field
|
||||
IDProduct gormcol.Field
|
||||
Quantity gormcol.Field
|
||||
QuantityRefunded gormcol.Field
|
||||
QuantityReturned gormcol.Field
|
||||
InCart gormcol.Field
|
||||
}{
|
||||
IDCustomization: gormcol.Field{Table: TableNamePsCustomization, Column: "id_customization"},
|
||||
IDProductAttribute: gormcol.Field{Table: TableNamePsCustomization, Column: "id_product_attribute"},
|
||||
IDAddressDelivery: gormcol.Field{Table: TableNamePsCustomization, Column: "id_address_delivery"},
|
||||
IDCart: gormcol.Field{Table: TableNamePsCustomization, Column: "id_cart"},
|
||||
IDProduct: gormcol.Field{Table: TableNamePsCustomization, Column: "id_product"},
|
||||
Quantity: gormcol.Field{Table: TableNamePsCustomization, Column: "quantity"},
|
||||
QuantityRefunded: gormcol.Field{Table: TableNamePsCustomization, Column: "quantity_refunded"},
|
||||
QuantityReturned: gormcol.Field{Table: TableNamePsCustomization, Column: "quantity_returned"},
|
||||
InCart: gormcol.Field{Table: TableNamePsCustomization, Column: "in_cart"},
|
||||
}
|
||||
Reference in New Issue
Block a user