57 lines
2.8 KiB
Go
57 lines
2.8 KiB
Go
// Code generated by gormcol. DO NOT EDIT.
|
|
|
|
package dbmodel
|
|
|
|
import (
|
|
"git.ma-al.com/goc_marek/gormcol"
|
|
"time"
|
|
)
|
|
|
|
const TableNamePsCategory = "ps_category"
|
|
|
|
// PsCategory mapped from table <ps_category>
|
|
type PsCategory struct {
|
|
IDCategory int32 `gorm:"column:id_category;primaryKey;autoIncrement:true;index:idx_category,priority:1" json:"id_category"`
|
|
IDParent int32 `gorm:"column:id_parent;not null;index:category_parent,priority:1" json:"id_parent"`
|
|
IDShopDefault int32 `gorm:"column:id_shop_default;not null;default:1" json:"id_shop_default"`
|
|
LevelDepth int32 `gorm:"column:level_depth;not null;index:level_depth,priority:1" json:"level_depth"`
|
|
Nleft int32 `gorm:"column:nleft;not null;index:activenleft,priority:2;index:idx_category,priority:3;index:nleftrightactive,priority:1" json:"nleft"`
|
|
Nright int32 `gorm:"column:nright;not null;index:activenright,priority:2;index:idx_category,priority:4;index:nleftrightactive,priority:2;index:nright,priority:1" json:"nright"`
|
|
Active bool `gorm:"column:active;not null;index:activenleft,priority:1;index:activenright,priority:1;index:idx_category,priority:2;index:idx_ps_category_active,priority:1;index:nleftrightactive,priority:3" json:"active"`
|
|
DateAdd time.Time `gorm:"column:date_add;not null" json:"date_add"`
|
|
DateUpd time.Time `gorm:"column:date_upd;not null" json:"date_upd"`
|
|
Position int32 `gorm:"column:position;not null" json:"position"`
|
|
IsRootCategory bool `gorm:"column:is_root_category;not null" json:"is_root_category"`
|
|
}
|
|
|
|
// TableName PsCategory's table name
|
|
func (*PsCategory) TableName() string {
|
|
return TableNamePsCategory
|
|
}
|
|
|
|
var PsCategoryCols = struct {
|
|
IDCategory gormcol.Field
|
|
IDParent gormcol.Field
|
|
IDShopDefault gormcol.Field
|
|
LevelDepth gormcol.Field
|
|
Nleft gormcol.Field
|
|
Nright gormcol.Field
|
|
Active gormcol.Field
|
|
DateAdd gormcol.Field
|
|
DateUpd gormcol.Field
|
|
Position gormcol.Field
|
|
IsRootCategory gormcol.Field
|
|
}{
|
|
IDCategory: gormcol.Field{}.Set((&PsCategory{}).TableName(), "id_category"),
|
|
IDParent: gormcol.Field{}.Set((&PsCategory{}).TableName(), "id_parent"),
|
|
IDShopDefault: gormcol.Field{}.Set((&PsCategory{}).TableName(), "id_shop_default"),
|
|
LevelDepth: gormcol.Field{}.Set((&PsCategory{}).TableName(), "level_depth"),
|
|
Nleft: gormcol.Field{}.Set((&PsCategory{}).TableName(), "nleft"),
|
|
Nright: gormcol.Field{}.Set((&PsCategory{}).TableName(), "nright"),
|
|
Active: gormcol.Field{}.Set((&PsCategory{}).TableName(), "active"),
|
|
DateAdd: gormcol.Field{}.Set((&PsCategory{}).TableName(), "date_add"),
|
|
DateUpd: gormcol.Field{}.Set((&PsCategory{}).TableName(), "date_upd"),
|
|
Position: gormcol.Field{}.Set((&PsCategory{}).TableName(), "position"),
|
|
IsRootCategory: gormcol.Field{}.Set((&PsCategory{}).TableName(), "is_root_category"),
|
|
}
|