spark-server/internal/module/conversation/entity/p2p.go
zhr ae9a71034d feat: implement Spark IM V3 modular monolith
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>
2026-09-17 19:52:11 +08:00

16 lines
276 B
Go

package entity
// P2P is the unique pair mapping. UserSmall is min(a,b), UserBig is max(a,b).
type P2P struct {
UserSmall int64
UserBig int64
ConversationID int64
}
func OrderUsers(a, b int64) (small, big int64) {
if a <= b {
return a, b
}
return b, a
}