Files
2026-03-30 14:31:19 +08:00

15 lines
504 B
Go

package plant
import (
"sundynix-go/global"
"time"
)
type UserBadge struct {
global.BaseModel
UserId string `gorm:"type:varchar(50);index;not null;column:user_id;comment:用户id" json:"userId"`
BadgeId string `gorm:"index:idx_user_badge;not null;column:badge_id;comment:徽章配置ID" json:"badgeId"`
AcquiredAt time.Time `gorm:"autoCreateTime;column:acquired_at;comment:获得时间" json:"acquiredAt"`
Badge *BadgeConfig `json:"badge" gorm:"foreignKey:BadgeId"`
}