19 lines
599 B
Go
19 lines
599 B
Go
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" }
|