Use table name constant in Cols for type safety
This commit is contained in:
34
app/model/dbmodel/ps_maal_invoice_note.go
Normal file
34
app/model/dbmodel/ps_maal_invoice_note.go
Normal file
@@ -0,0 +1,34 @@
|
||||
// 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 TableNamePsMaalInvoiceNote = "ps_maal_invoice_note"
|
||||
|
||||
// PsMaalInvoiceNote mapped from table <ps_maal_invoice_note>
|
||||
type PsMaalInvoiceNote struct {
|
||||
IDOrder int32 `gorm:"column:id_order;primaryKey" json:"id_order"`
|
||||
Note *string `gorm:"column:note" json:"note"`
|
||||
DateAdd time.Time `gorm:"column:date_add;not null;default:current_timestamp()" json:"date_add"`
|
||||
}
|
||||
|
||||
// TableName PsMaalInvoiceNote's table name
|
||||
func (*PsMaalInvoiceNote) TableName() string {
|
||||
return TableNamePsMaalInvoiceNote
|
||||
}
|
||||
|
||||
var PsMaalInvoiceNoteCols = struct {
|
||||
IDOrder gormcol.Field
|
||||
Note gormcol.Field
|
||||
DateAdd gormcol.Field
|
||||
}{
|
||||
IDOrder: gormcol.Field{Table: TableNamePsMaalInvoiceNote, Column: "id_order"},
|
||||
Note: gormcol.Field{Table: TableNamePsMaalInvoiceNote, Column: "note"},
|
||||
DateAdd: gormcol.Field{Table: TableNamePsMaalInvoiceNote, Column: "date_add"},
|
||||
}
|
||||
Reference in New Issue
Block a user