Add HTTP /v1 MVC, TCP send path, groups with server-side member-avatar collage, object-storage upload, and friends/favorites around the architecture-v3 layout. Co-authored-by: Cursor <cursoragent@cursor.com>
29 lines
552 B
Go
29 lines
552 B
Go
// Package entity holds favorite domain types. Media keys in Content are perm/fav copies.
|
|
package entity
|
|
|
|
const (
|
|
ListDefault = 20
|
|
ListMax = 100
|
|
)
|
|
|
|
// Favorite is a user-owned snapshot of a message. Object keys are copied off chat/.
|
|
type Favorite struct {
|
|
ID int64
|
|
UserID int64
|
|
MsgID int64
|
|
ConversationID int64
|
|
MessageType int16
|
|
Content []byte
|
|
CreatedAtMS int64
|
|
}
|
|
|
|
func ClampLimit(limit int) int {
|
|
if limit <= 0 {
|
|
return ListDefault
|
|
}
|
|
if limit > ListMax {
|
|
return ListMax
|
|
}
|
|
return limit
|
|
}
|