实现从json读取猪营养需求并写入数据库
This commit is contained in:
@@ -3,8 +3,12 @@ package models
|
||||
// PigBreed 猪品种模型
|
||||
type PigBreed struct {
|
||||
Model
|
||||
Name string `gorm:"size:50;not null;comment:品种名称"`
|
||||
Description string `gorm:"size:255;comment:品种描述"`
|
||||
Name string `gorm:"size:50;not null;comment:品种名称"`
|
||||
Description string `gorm:"type:text" json:"description"` // 保留描述字段
|
||||
ParentInfo string `gorm:"type:text" json:"parent_info"` // 父母信息
|
||||
AppearanceFeatures string `gorm:"type:text" json:"appearance_features"` // 外貌特征
|
||||
BreedAdvantages string `gorm:"type:text" json:"breed_advantages"` // 品种优点
|
||||
BreedDisadvantages string `gorm:"type:text" json:"breed_disadvantages"` // 品种缺点
|
||||
}
|
||||
|
||||
func (PigBreed) TableName() string {
|
||||
|
||||
Reference in New Issue
Block a user