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

33 lines
647 B
Go

// Package entity holds user domain types. Persistence belongs in model.
package entity
import "time"
const StatusActive = 1
const (
GenderUnknown = 0
GenderMale = 1
GenderFemale = 2
)
func ValidGender(g int) bool {
return g == GenderUnknown || g == GenderMale || g == GenderFemale
}
// User is the account. ID is uid (Snowflake), never AUTO_INCREMENT.
type User struct {
ID int64
SparkID string
Nickname string
Avatar string
QRCode string
Birthday time.Time
Gender int
Status int
LastLoginAt time.Time
LastActiveAt time.Time
CreatedAt time.Time
UpdatedAt time.Time
}