// 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 }