The public tree and its history contain only the listed paths. Earlier projection history remains preserved internally. Source-Sha: 913fde029b935671833254797f0f20f1eb9fabba Policy-Sha: 913fde029b935671833254797f0f20f1eb9fabba Tree-Digest: 180ae530c1058a2a5c89837bdce2d323ae83e669e38590ca72e75b8d92b7262f
29 lines
1.1 KiB
Go
29 lines
1.1 KiB
Go
package models
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/gofrs/uuid/v5"
|
|
)
|
|
|
|
// MaintenanceWindow represents a recurring weekly maintenance window
|
|
// for gating update installations. DayOfWeek uses Go convention (0=Sunday).
|
|
type MaintenanceWindow struct {
|
|
ID uuid.UUID `json:"id" db:"id"`
|
|
DayOfWeek int `json:"day_of_week" db:"day_of_week"` // 0=Sunday, 6=Saturday
|
|
StartTime string `json:"start_time" db:"start_time"` // HH:MM (TIME column)
|
|
EndTime string `json:"end_time" db:"end_time"` // HH:MM (TIME column)
|
|
Description string `json:"description" db:"description"`
|
|
Enabled bool `json:"enabled" db:"enabled"`
|
|
CreatedAt time.Time `json:"created_at" db:"created_at"`
|
|
UpdatedAt time.Time `json:"updated_at" db:"updated_at"`
|
|
}
|
|
|
|
// MaintenanceWindowInput is the request body for create/update operations.
|
|
type MaintenanceWindowInput struct {
|
|
DayOfWeek int `json:"day_of_week"`
|
|
StartTime string `json:"start_time"`
|
|
EndTime string `json:"end_time"`
|
|
Description string `json:"description"`
|
|
Enabled *bool `json:"enabled"`
|
|
}
|