add models generation and josn print
This commit is contained in:
20
app/model/prestadb/ps_image.go
Normal file
20
app/model/prestadb/ps_image.go
Normal file
@@ -0,0 +1,20 @@
|
||||
// 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 prestadb
|
||||
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user