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,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"
const TableNamePsContact = "ps_contact"
// PsContact mapped from table <ps_contact>
type PsContact struct {
IDContact int32 `gorm:"column:id_contact;primaryKey;autoIncrement:true" json:"id_contact"`
Email string `gorm:"column:email;not null" json:"email"`
CustomerService bool `gorm:"column:customer_service;not null" json:"customer_service"`
Position int32 `gorm:"column:position;not null" json:"position"`
}
// TableName PsContact's table name
func (*PsContact) TableName() string {
return TableNamePsContact
}
var PsContactCols = struct {
IDContact gormcol.Field
Email gormcol.Field
CustomerService gormcol.Field
Position gormcol.Field
}{
IDContact: gormcol.Field{Table: TableNamePsContact, Column: "id_contact"},
Email: gormcol.Field{Table: TableNamePsContact, Column: "email"},
CustomerService: gormcol.Field{Table: TableNamePsContact, Column: "customer_service"},
Position: gormcol.Field{Table: TableNamePsContact, Column: "position"},
}