package model import "time" // UserBadgeBackpack stores user-owned badge records from the Java badge system. type UserBadgeBackpack struct { ID int64 `gorm:"column:id;primaryKey"` UserID int64 `gorm:"column:user_id;index:idx_user_badge_backpack_user"` BadgeID int64 `gorm:"column:badge_id;index:idx_user_badge_backpack_badge"` ExpireType string `gorm:"column:expire_type;size:32"` ExpireTime time.Time `gorm:"column:expire_time"` UseProps bool `gorm:"column:is_use_props"` CreateTime time.Time `gorm:"column:create_time"` UpdateTime time.Time `gorm:"column:update_time"` } // TableName returns the user badge backpack table name. func (UserBadgeBackpack) TableName() string { return "user_badge_backpack" } // SysBadgeConfig stores badge metadata from the Java badge system. type SysBadgeConfig struct { ID int64 `gorm:"column:id;primaryKey"` Type string `gorm:"column:type;size:64"` BadgeLevel int `gorm:"column:badge_level"` Milestone int64 `gorm:"column:milestone"` BadgeName string `gorm:"column:badge_name;size:128"` BadgeKey string `gorm:"column:badge_key;size:128"` Del bool `gorm:"column:is_del"` CreateTime time.Time `gorm:"column:create_time"` UpdateTime time.Time `gorm:"column:update_time"` } // TableName returns the badge config table name. func (SysBadgeConfig) TableName() string { return "sys_badge_config" } // SysBadgePictureConfig stores per-platform badge images. type SysBadgePictureConfig struct { ID int64 `gorm:"column:id;primaryKey"` BadgeConfigID int64 `gorm:"column:badge_config_id;index:idx_badge_picture_config_badge"` SysOrigin string `gorm:"column:sys_origin;size:32;index:idx_badge_picture_config_sys"` SelectURL string `gorm:"column:select_url;size:512"` NotSelectURL string `gorm:"column:not_select_url;size:512"` AnimationURL string `gorm:"column:animation_url;size:512"` CreateTime time.Time `gorm:"column:create_time"` UpdateTime time.Time `gorm:"column:update_time"` } // TableName returns the badge picture config table name. func (SysBadgePictureConfig) TableName() string { return "sys_badge_picture_config" }