package model import "time" type Service struct { ID int `json:"id"` Name string `json:"name"` URL string `json:"url"` GroupName string `json:"group_name"` IntervalSeconds int `json:"interval_seconds"` IsActive bool `json:"is_active"` DiscordWebhookURL string `json:"discord_webhook_url,omitempty"` AlertEmail string `json:"alert_email,omitempty"` KeywordToFind string `json:"keyword_to_find,omitempty"` CreatedAt time.Time `json:"created_at"` } type Heartbeat struct { ID int `json:"id"` ServiceID int `json:"service_id"` StatusCode int `json:"status_code"` ResponseTimeMs int64 `json:"response_time_ms"` IsUp bool `json:"is_up"` ErrorMessage string `json:"error_message,omitempty"` TestedAt time.Time `json:"tested_at"` } type Maintenance struct { ID int `json:"id"` Title string `json:"title"` StartTime time.Time `json:"start_time"` EndTime time.Time `json:"end_time"` IsActive bool `json:"is_active"` } type ServiceStats struct { ServiceID int `json:"service_id"` Uptime24h float64 `json:"uptime_24h"` Uptime7d float64 `json:"uptime_7d"` Uptime30d float64 `json:"uptime_30d"` AvgResponseMs24h float64 `json:"avg_response_ms_24h"` AvgResponseMs7d float64 `json:"avg_response_ms_7d"` AvgResponseMs30d float64 `json:"avg_response_ms_30d"` TotalChecks24h int `json:"total_checks_24h"` TotalChecks7d int `json:"total_checks_7d"` TotalChecks30d int `json:"total_checks_30d"` } type ServiceWithHeartbeat struct { Service LastHeartbeat *Heartbeat `json:"last_heartbeat,omitempty"` } type SSLInfo struct { ServiceID int `json:"service_id"` Issuer string `json:"issuer"` ExpiresAt time.Time `json:"expires_at"` DaysRemaining int `json:"days_remaining"` CheckedAt time.Time `json:"checked_at"` }