package model import "time" // Disease 蚕病百科条目(知识库-蚕病百科) type Disease struct { ID string `gorm:"type:uuid;primaryKey;default:gen_random_uuid()" json:"id"` Name string `gorm:"size:64" json:"name"` Category string `gorm:"size:32;index" json:"category"` // viral/fungal/bacterial/protozoan/other Pathogen string `gorm:"type:text" json:"pathogen"` Transmission string `gorm:"type:text" json:"transmission"` Medium string `gorm:"type:text" json:"medium"` Incubation string `gorm:"type:text" json:"incubation"` Symptoms string `gorm:"type:text" json:"symptoms"` HighRiskStage string `gorm:"column:high_risk_stage;type:text" json:"highRiskStage"` HighRiskCondition string `gorm:"column:high_risk_condition;type:text" json:"highRiskCondition"` LethalTime string `gorm:"column:lethal_time;type:text" json:"lethalTime"` SpreadTrend string `gorm:"column:spread_trend;type:text" json:"spreadTrend"` Recurrence string `gorm:"type:text" json:"recurrence"` Detection string `gorm:"type:text" json:"detection"` Prevention string `gorm:"type:text" json:"prevention"` ImageURL *string `gorm:"column:image_url;size:512" json:"imageUrl,omitempty"` SortOrder int `gorm:"column:sort_order;type:int;default:0" json:"sortOrder"` Enabled bool `gorm:"default:true" json:"enabled"` CreatedAt time.Time `gorm:"type:timestamptz" json:"createdAt"` UpdatedAt time.Time `gorm:"type:timestamptz" json:"updatedAt"` } func (Disease) TableName() string { return "diseases" } // KnowledgeArticle 知识文章(AI 结果解读、LAMP/SERS 教程、季节性防控提醒等) type KnowledgeArticle struct { ID string `gorm:"type:uuid;primaryKey;default:gen_random_uuid()" json:"id"` Kind string `gorm:"size:32;index" json:"kind"` // ai_guide/lamp_guide/sers_guide/seasonal_tip Title string `gorm:"size:128" json:"title"` Summary string `gorm:"type:text" json:"summary"` Content string `gorm:"type:text" json:"content"` SortOrder int `gorm:"column:sort_order;type:int;default:0" json:"sortOrder"` Enabled bool `gorm:"default:true" json:"enabled"` CreatedAt time.Time `gorm:"type:timestamptz" json:"createdAt"` UpdatedAt time.Time `gorm:"type:timestamptz" json:"updatedAt"` } func (KnowledgeArticle) TableName() string { return "knowledge_articles" }