package db import "time" type User struct { ID int64 `json:"id"` Username string `json:"username"` PasswordHash string `json:"-"` IsAdmin bool `json:"is_admin"` AvatarPath *string `json:"-"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` } type Session struct { ID int64 `json:"id"` UserID int64 `json:"user_id"` Token string `json:"token"` ExpiresAt time.Time `json:"expires_at"` CreatedAt time.Time `json:"created_at"` } type Image struct { ID int64 `json:"id"` Filename string `json:"filename"` StoragePath string `json:"storage_path"` ThumbnailPath *string `json:"thumbnail_path"` UploadedBy int64 `json:"uploaded_by"` UploaderUsername string `json:"uploader_username"` AvatarURL string `json:"avatar_url"` FileSize int64 `json:"file_size"` Width int `json:"width"` Height int `json:"height"` MimeType string `json:"mime_type"` InnateTags []string `json:"innate_tags,omitempty"` Duration float64 `json:"duration,omitempty"` GemCount int `json:"gem_count,omitempty"` Gemmed bool `json:"gemmed,omitempty"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` Tags []string `json:"tags,omitempty"` } type Tag struct { Tag string `json:"tag"` UsageCount int `json:"usage_count"` } // ImageList is a paginated result of images. type ImageList struct { Images []Image `json:"images"` Total int `json:"total"` }