package entity // Text is a plain-text body. Stored as JSON bytes, never as a raw SQL string column. type Text struct { Body string `json:"body"` } // Image references an uploaded object. Bytes themselves are not stored in messages.content. type Image struct { Key string `json:"key"` Mime string `json:"mime,omitempty"` Width int `json:"w,omitempty"` Height int `json:"h,omitempty"` Size int64 `json:"size,omitempty"` ThumbKey string `json:"thumb_key,omitempty"` } // Voice is an audio clip in object storage. type Voice struct { Key string `json:"key"` DurationMS int `json:"duration_ms"` Size int64 `json:"size,omitempty"` } // Video is a video clip in object storage. type Video struct { Key string `json:"key"` Mime string `json:"mime,omitempty"` Width int `json:"w,omitempty"` Height int `json:"h,omitempty"` DurationMS int `json:"duration_ms,omitempty"` Size int64 `json:"size,omitempty"` CoverKey string `json:"cover_key,omitempty"` } // Emoji is a sticker from a pack (not an image file in content). type Emoji struct { Pack string `json:"pack"` ID string `json:"id"` } // GIF is an animated image in object storage. type GIF struct { Key string `json:"key"` Mime string `json:"mime,omitempty"` Width int `json:"w,omitempty"` Height int `json:"h,omitempty"` Size int64 `json:"size,omitempty"` } // File is a generic attachment in object storage. type File struct { Key string `json:"key"` Name string `json:"name"` Size int64 `json:"size"` Mime string `json:"mime,omitempty"` } // Location is a geographic pin. type Location struct { Lat float64 `json:"lat"` Lng float64 `json:"lng"` Name string `json:"name,omitempty"` Address string `json:"address,omitempty"` } // System is a server-generated notice (member join, recall hint, etc.). type System struct { Kind string `json:"kind"` Body string `json:"body,omitempty"` }