Use table name constant in Cols for type safety

This commit is contained in:
2026-03-29 15:29:39 +02:00
parent 0cfddddccb
commit a53e24c5b8
315 changed files with 13092 additions and 5 deletions

View File

@@ -0,0 +1,58 @@
// 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 TableNamePsDpdpolandParcel = "ps_dpdpoland_parcel"
// PsDpdpolandParcel mapped from table <ps_dpdpoland_parcel>
type PsDpdpolandParcel struct {
IDParcel int32 `gorm:"column:id_parcel;primaryKey" json:"id_parcel"`
IDPackageWs int32 `gorm:"column:id_package_ws;not null" json:"id_package_ws"`
Waybill string `gorm:"column:waybill;not null" json:"waybill"`
Content string `gorm:"column:content;not null" json:"content"`
Weight float64 `gorm:"column:weight;not null" json:"weight"`
Height float64 `gorm:"column:height;not null" json:"height"`
Length float64 `gorm:"column:length;not null" json:"length"`
Width float64 `gorm:"column:width;not null" json:"width"`
Number int32 `gorm:"column:number;not null" json:"number"`
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 PsDpdpolandParcel's table name
func (*PsDpdpolandParcel) TableName() string {
return TableNamePsDpdpolandParcel
}
var PsDpdpolandParcelCols = struct {
IDParcel gormcol.Field
IDPackageWs gormcol.Field
Waybill gormcol.Field
Content gormcol.Field
Weight gormcol.Field
Height gormcol.Field
Length gormcol.Field
Width gormcol.Field
Number gormcol.Field
DateAdd gormcol.Field
DateUpd gormcol.Field
}{
IDParcel: gormcol.Field{Table: TableNamePsDpdpolandParcel, Column: "id_parcel"},
IDPackageWs: gormcol.Field{Table: TableNamePsDpdpolandParcel, Column: "id_package_ws"},
Waybill: gormcol.Field{Table: TableNamePsDpdpolandParcel, Column: "waybill"},
Content: gormcol.Field{Table: TableNamePsDpdpolandParcel, Column: "content"},
Weight: gormcol.Field{Table: TableNamePsDpdpolandParcel, Column: "weight"},
Height: gormcol.Field{Table: TableNamePsDpdpolandParcel, Column: "height"},
Length: gormcol.Field{Table: TableNamePsDpdpolandParcel, Column: "length"},
Width: gormcol.Field{Table: TableNamePsDpdpolandParcel, Column: "width"},
Number: gormcol.Field{Table: TableNamePsDpdpolandParcel, Column: "number"},
DateAdd: gormcol.Field{Table: TableNamePsDpdpolandParcel, Column: "date_add"},
DateUpd: gormcol.Field{Table: TableNamePsDpdpolandParcel, Column: "date_upd"},
}