package models import "time" // SupportCalendar is opt-in. Absence of a team row preserves dated schedules. // TeamID zero stores the deployment-wide timezone, not another organization. type SupportCalendar struct { ID int64 `gorm:"primaryKey;autoIncrement"` TeamID int64 `gorm:"not null;uniqueIndex"` Mode string `gorm:"type:varchar(20);not null;default:'legacy'"` Timezone string `gorm:"type:varchar(100);not null;default:''"` WeeklyJSON string `gorm:"type:text;not null"` ExceptionsJSON string `gorm:"type:text;not null"` UpdatedAt time.Time } // AgentPresenceLease contains no bearer credential or client address. Multiple // independent connections may lease presence for the same authenticated user. type AgentPresenceLease struct { ID string `gorm:"type:varchar(64);primaryKey"` UserID int64 `gorm:"not null;index"` LoginSessionID int64 `gorm:"not null;index"` ExpiresAt time.Time `gorm:"not null;index"` }