06488f0237
功能: - Go后端 (Gin + GORM + PostgreSQL) - UniApp用户端 (iOS/Android/小程序) - DaisyUI5后台管理 - JWT认证 + 微信登录 - 盲选加权算法 - 会员系统 + 优惠券 - 打分评价 + 偏好学习
38 lines
1.4 KiB
Go
38 lines
1.4 KiB
Go
package model
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
type BlindSession struct {
|
|
ID uint `gorm:"primaryKey" json:"id"`
|
|
UserID uint `json:"user_id"`
|
|
CategoryID uint `json:"category_id"`
|
|
PriceRange string `gorm:"size:50" json:"price_range"`
|
|
DistanceRange string `gorm:"size:50" json:"distance_range"`
|
|
ResultPackageID uint `json:"result_package_id"`
|
|
RevealedAt time.Time `json:"revealed_at"`
|
|
Accepted bool `gorm:"default:false" json:"accepted"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
}
|
|
|
|
func (BlindSession) TableName() string { return "blind_sessions" }
|
|
|
|
type BlindResult struct {
|
|
SessionID uint `gorm:"primaryKey" json:"id"`
|
|
UserID uint `json:"user_id"`
|
|
PackageName string `gorm:"size:200" json:"package_name"`
|
|
MerchantName string `gorm:"size:200" json:"merchant_name"`
|
|
MerchantRating float64 `json:"merchant_rating"`
|
|
MatchScore float64 `json:"match_score"`
|
|
Description string `gorm:"type:text" json:"description"`
|
|
PriceRange string `json:"price_range"`
|
|
ActualPrice int `json:"actual_price"`
|
|
HasCoupon bool `json:"has_coupon"`
|
|
CouponValue string `json:"coupon_value"`
|
|
MatchedTags string `gorm:"type:text[]" json:"matched_tags"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
}
|
|
|
|
func (BlindResult) TableName() string { return "blind_results" }
|