spark-server/internal/module/friend/entity/pair.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

22 lines
274 B
Go

package entity
import "time"
func OrderUsers(a, b int64) (small, big int64) {
if a <= b {
return a, b
}
return b, a
}
func SameUser(a, b int64) bool {
return a > 0 && a == b
}
func UnixMS(t time.Time) int64 {
if t.IsZero() {
return 0
}
return t.UnixMilli()
}