06488f0237
功能: - Go后端 (Gin + GORM + PostgreSQL) - UniApp用户端 (iOS/Android/小程序) - DaisyUI5后台管理 - JWT认证 + 微信登录 - 盲选加权算法 - 会员系统 + 优惠券 - 打分评价 + 偏好学习
25 lines
886 B
Go
25 lines
886 B
Go
package model
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
type UserBehavior struct {
|
|
ID uint `gorm:"primaryKey" json:"id"`
|
|
UserID uint `json:"user_id"`
|
|
PackageID uint `json:"package_id"`
|
|
BehaviorType string `gorm:"size:50" json:"behavior_type"` // viewed/selected/attended/reviewed/skipped
|
|
SystemScore float64 `gorm:"default:0" json:"system_score"`
|
|
ReviewRating int8 `json:"review_rating"`
|
|
TasteScore int8 `json:"taste_score"`
|
|
ValueScore int8 `json:"value_score"`
|
|
DistanceScore int8 `json:"distance_score"`
|
|
MatchScore int8 `json:"match_score"`
|
|
FeedbackTags string `gorm:"type:text[]" json:"feedback_tags"`
|
|
Text string `gorm:"type:text" json:"text"`
|
|
IsRepeat bool `gorm:"default:false" json:"is_repeat"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
}
|
|
|
|
func (UserBehavior) TableName() string { return "user_behaviors" }
|