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>
16 lines
276 B
Go
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
|
|
}
|