Use table name constant in Cols for type safety
This commit is contained in:
64
app/model/dbmodel/ps_order_payment.go
Normal file
64
app/model/dbmodel/ps_order_payment.go
Normal file
@@ -0,0 +1,64 @@
|
||||
// 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 TableNamePsOrderPayment = "ps_order_payment"
|
||||
|
||||
// PsOrderPayment mapped from table <ps_order_payment>
|
||||
type PsOrderPayment struct {
|
||||
IDOrderPayment int32 `gorm:"column:id_order_payment;primaryKey;autoIncrement:true" json:"id_order_payment"`
|
||||
OrderReference *string `gorm:"column:order_reference;index:order_reference,priority:1" json:"order_reference"`
|
||||
IDCurrency int32 `gorm:"column:id_currency;not null" json:"id_currency"`
|
||||
Amount float64 `gorm:"column:amount;not null" json:"amount"`
|
||||
PaymentMethod string `gorm:"column:payment_method;not null" json:"payment_method"`
|
||||
ConversionRate float64 `gorm:"column:conversion_rate;not null;default:1.000000" json:"conversion_rate"`
|
||||
TransactionID *string `gorm:"column:transaction_id" json:"transaction_id"`
|
||||
CardNumber *string `gorm:"column:card_number" json:"card_number"`
|
||||
CardBrand *string `gorm:"column:card_brand" json:"card_brand"`
|
||||
CardExpiration *string `gorm:"column:card_expiration" json:"card_expiration"`
|
||||
CardHolder *string `gorm:"column:card_holder" json:"card_holder"`
|
||||
DateAdd time.Time `gorm:"column:date_add;not null" json:"date_add"`
|
||||
IDPaymentModule int32 `gorm:"column:id_payment_module;not null" json:"id_payment_module"`
|
||||
}
|
||||
|
||||
// TableName PsOrderPayment's table name
|
||||
func (*PsOrderPayment) TableName() string {
|
||||
return TableNamePsOrderPayment
|
||||
}
|
||||
|
||||
var PsOrderPaymentCols = struct {
|
||||
IDOrderPayment gormcol.Field
|
||||
OrderReference gormcol.Field
|
||||
IDCurrency gormcol.Field
|
||||
Amount gormcol.Field
|
||||
PaymentMethod gormcol.Field
|
||||
ConversionRate gormcol.Field
|
||||
TransactionID gormcol.Field
|
||||
CardNumber gormcol.Field
|
||||
CardBrand gormcol.Field
|
||||
CardExpiration gormcol.Field
|
||||
CardHolder gormcol.Field
|
||||
DateAdd gormcol.Field
|
||||
IDPaymentModule gormcol.Field
|
||||
}{
|
||||
IDOrderPayment: gormcol.Field{Table: TableNamePsOrderPayment, Column: "id_order_payment"},
|
||||
OrderReference: gormcol.Field{Table: TableNamePsOrderPayment, Column: "order_reference"},
|
||||
IDCurrency: gormcol.Field{Table: TableNamePsOrderPayment, Column: "id_currency"},
|
||||
Amount: gormcol.Field{Table: TableNamePsOrderPayment, Column: "amount"},
|
||||
PaymentMethod: gormcol.Field{Table: TableNamePsOrderPayment, Column: "payment_method"},
|
||||
ConversionRate: gormcol.Field{Table: TableNamePsOrderPayment, Column: "conversion_rate"},
|
||||
TransactionID: gormcol.Field{Table: TableNamePsOrderPayment, Column: "transaction_id"},
|
||||
CardNumber: gormcol.Field{Table: TableNamePsOrderPayment, Column: "card_number"},
|
||||
CardBrand: gormcol.Field{Table: TableNamePsOrderPayment, Column: "card_brand"},
|
||||
CardExpiration: gormcol.Field{Table: TableNamePsOrderPayment, Column: "card_expiration"},
|
||||
CardHolder: gormcol.Field{Table: TableNamePsOrderPayment, Column: "card_holder"},
|
||||
DateAdd: gormcol.Field{Table: TableNamePsOrderPayment, Column: "date_add"},
|
||||
IDPaymentModule: gormcol.Field{Table: TableNamePsOrderPayment, Column: "id_payment_module"},
|
||||
}
|
||||
Reference in New Issue
Block a user