feat(server-go): 和风天气接入与高发病天气预警规则(#12)

This commit is contained in:
weijuesen
2026-08-12 17:40:24 +08:00
parent fa86542e55
commit c7f18c1381
10 changed files with 464 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
package model
import (
"encoding/json"
"time"
)
// WeatherAlert 高发病天气预警
type WeatherAlert struct {
ID string `gorm:"type:uuid;primaryKey;default:gen_random_uuid()" json:"id"`
Disease string `gorm:"size:64" json:"disease"`
Level string `gorm:"size:16" json:"level"`
Reason string `gorm:"type:text" json:"reason"`
Snapshot json.RawMessage `gorm:"type:jsonb" json:"snapshot,omitempty"`
CreatedAt time.Time `gorm:"type:timestamptz" json:"createdAt"`
}
func (WeatherAlert) TableName() string { return "weather_alerts" }