package model import "time" type User struct { ID string `json:"id"` Username string `json:"username"` DisplayName string `json:"display_name"` PasswordHash string `json:"-"` CreatedAt time.Time `json:"created_at"` } type Chat struct { ID string `json:"id"` Title string `json:"title"` MemberIDs []string `json:"member_ids"` CreatedAt time.Time `json:"created_at"` } type Message struct { ID string `json:"id"` ChatID string `json:"chat_id"` SenderID string `json:"sender_id"` Text string `json:"text"` AttachmentIDs []string `json:"attachment_ids"` CreatedAt time.Time `json:"created_at"` } type Session struct { ID string `json:"-"` UserID string `json:"-"` TokenHash string `json:"-"` ExpiresAt time.Time `json:"expires_at"` CreatedAt time.Time `json:"created_at"` } type Attachment struct { ID string `json:"id"` ChatID string `json:"chat_id"` OwnerID string `json:"owner_id"` Filename string `json:"filename"` ObjectKey string `json:"-"` ContentType string `json:"content_type"` SizeBytes int64 `json:"size_bytes"` SHA256 string `json:"sha256"` Status string `json:"status"` Variants []any `json:"variants"` ErrorCode *string `json:"error_code"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` } type Job struct { ID string AttachmentID string Status string Attempts int MaxAttempts int NextRunAt time.Time LastError *string CreatedAt time.Time LeaseUntil *time.Time LeasedBy *string PipelineVersion int } type StagingRef struct { ID string StagingKey string } type Variant struct { Name string `json:"name"` ContentType string `json:"content_type"` SizeBytes int64 `json:"size_bytes"` Width int `json:"width"` Height int `json:"height"` SHA256 string `json:"sha256"` ObjectKey string `json:"-"` }