spark-server/internal/module/meta/entity/enum.go
2026-09-18 17:51:42 +08:00

38 lines
1.6 KiB
Go

// Package entity holds the enum catalog returned by GET /v1/meta/enums.
package entity
// Item is one closed-set member. Value is the wire JSON/TCP/SQL number or string.
type Item struct {
Value any `json:"value"`
Name string `json:"name"`
Label string `json:"label"`
}
// Catalog is the client bootstrap payload. Keys match OpenAPI schema names in snake_case.
type Catalog struct {
Gender []Item `json:"gender"`
UserStatus []Item `json:"user_status"`
ConversationType []Item `json:"conversation_type"`
MessageKind []Item `json:"message_kind"`
MessageType []Item `json:"message_type"`
MessageStatus []Item `json:"message_status"`
RelationKind []Item `json:"relation_kind"`
FriendRequestStatus []Item `json:"friend_request_status"`
FriendSource []Item `json:"friend_source"`
ReportReason []Item `json:"report_reason"`
GroupStatus []Item `json:"group_status"`
GroupRole []Item `json:"group_role"`
MailboxEventType []Item `json:"mailbox_event_type"`
TCPCommand []Item `json:"tcp_command"`
EnvelopeCode []Item `json:"envelope_code"`
DeviceType []Item `json:"device_type"`
Language []Item `json:"language"`
UploadPurpose []Item `json:"upload_purpose"`
SystemKind []Item `json:"system_kind"`
MomentKind []Item `json:"moment_kind"`
MomentVisibility []Item `json:"moment_visibility"`
MomentStatus []Item `json:"moment_status"`
MomentNoticeKind []Item `json:"moment_notice_kind"`
MomentVisibleDays []Item `json:"moment_visible_days"`
}