2023-04-27 15:56:12 +08:00
|
|
|
package entity
|
|
|
|
|
|
|
|
import "Lee-WineList/common/types"
|
|
|
|
|
|
|
|
type Material struct {
|
|
|
|
types.BaseDbModel
|
2023-04-27 17:36:07 +08:00
|
|
|
Name string `gorm:"column:name;type:varchar(255);comment:材料名;NOT NULL" json:"name"`
|
2023-04-27 18:02:38 +08:00
|
|
|
ML string `gorm:"column:ml;type:varchar(20) unsigned;comment:毫升" json:"ml"`
|
2023-04-27 17:36:07 +08:00
|
|
|
OtherUnit string `gorm:"column:other_unit;type:varchar(255);comment:其他单位" json:"other_unit"`
|
|
|
|
WindId int `gorm:"column:wine_id;type:int(11) unsigned;comment:酒ID;NOT NULL" json:"wine_id"`
|
2023-04-27 15:56:12 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
func (Material) TableName() string {
|
|
|
|
return "materials"
|
|
|
|
}
|