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>
22 lines
274 B
Go
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()
|
|
}
|