fix products listing
This commit is contained in:
32
app/model/dbmodel/ps_image.go
Normal file
32
app/model/dbmodel/ps_image.go
Normal file
@@ -0,0 +1,32 @@
|
||||
// Code generated by gormcol. DO NOT EDIT.
|
||||
|
||||
package dbmodel
|
||||
|
||||
import "git.ma-al.com/goc_marek/gormcol"
|
||||
|
||||
const TableNamePsImage = "ps_image"
|
||||
|
||||
// PsImage mapped from table <ps_image>
|
||||
type PsImage struct {
|
||||
IDImage int32 `gorm:"column:id_image;primaryKey;autoIncrement:true;uniqueIndex:idx_product_image,priority:1" json:"id_image"`
|
||||
IDProduct int32 `gorm:"column:id_product;not null;uniqueIndex:idx_product_image,priority:2;uniqueIndex:id_product_cover,priority:1;index:image_product,priority:1" json:"id_product"`
|
||||
Position int32 `gorm:"column:position;not null" json:"position"`
|
||||
Cover *bool `gorm:"column:cover;uniqueIndex:idx_product_image,priority:3;uniqueIndex:id_product_cover,priority:2" json:"cover"`
|
||||
}
|
||||
|
||||
// TableName PsImage's table name
|
||||
func (*PsImage) TableName() string {
|
||||
return TableNamePsImage
|
||||
}
|
||||
|
||||
var PsImageCols = struct {
|
||||
IDImage gormcol.Field
|
||||
IDProduct gormcol.Field
|
||||
Position gormcol.Field
|
||||
Cover gormcol.Field
|
||||
}{
|
||||
IDImage: gormcol.Field{}.Set((&PsImage{}).TableName(), "id_image"),
|
||||
IDProduct: gormcol.Field{}.Set((&PsImage{}).TableName(), "id_product"),
|
||||
Position: gormcol.Field{}.Set((&PsImage{}).TableName(), "position"),
|
||||
Cover: gormcol.Field{}.Set((&PsImage{}).TableName(), "cover"),
|
||||
}
|
||||
Reference in New Issue
Block a user