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,43 @@
// 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 TableNamePsConnectionsSource = "ps_connections_source"
// PsConnectionsSource mapped from table <ps_connections_source>
type PsConnectionsSource struct {
IDConnectionsSource int32 `gorm:"column:id_connections_source;primaryKey;autoIncrement:true" json:"id_connections_source"`
IDConnections int32 `gorm:"column:id_connections;not null;index:connections,priority:1" json:"id_connections"`
HTTPReferer *string `gorm:"column:http_referer;index:http_referer,priority:1" json:"http_referer"`
RequestURI *string `gorm:"column:request_uri;index:request_uri,priority:1" json:"request_uri"`
Keywords *string `gorm:"column:keywords" json:"keywords"`
DateAdd time.Time `gorm:"column:date_add;not null;index:orderby,priority:1" json:"date_add"`
}
// TableName PsConnectionsSource's table name
func (*PsConnectionsSource) TableName() string {
return TableNamePsConnectionsSource
}
var PsConnectionsSourceCols = struct {
IDConnectionsSource gormcol.Field
IDConnections gormcol.Field
HTTPReferer gormcol.Field
RequestURI gormcol.Field
Keywords gormcol.Field
DateAdd gormcol.Field
}{
IDConnectionsSource: gormcol.Field{Table: TableNamePsConnectionsSource, Column: "id_connections_source"},
IDConnections: gormcol.Field{Table: TableNamePsConnectionsSource, Column: "id_connections"},
HTTPReferer: gormcol.Field{Table: TableNamePsConnectionsSource, Column: "http_referer"},
RequestURI: gormcol.Field{Table: TableNamePsConnectionsSource, Column: "request_uri"},
Keywords: gormcol.Field{Table: TableNamePsConnectionsSource, Column: "keywords"},
DateAdd: gormcol.Field{Table: TableNamePsConnectionsSource, Column: "date_add"},
}