package model import "time" // MatchRecord 匹配记录,每次用户成功匹配时写入 type MatchRecord struct { ID string `gorm:"column:id;primaryKey;size:50" json:"id"` UserID string `gorm:"column:user_id;index;size:50;not null" json:"userId"` MatchType string `gorm:"column:match_type;index;size:50" json:"matchType"` Phone *string `gorm:"column:phone;size:20" json:"phone"` WechatID *string `gorm:"column:wechat_id;size:100" json:"wechatId"` MatchedUserID string `gorm:"column:matched_user_id;index;size:50" json:"matchedUserId"` MatchScore *int `gorm:"column:match_score" json:"matchScore"` Status *string `gorm:"column:status;size:20" json:"status"` CreatedAt time.Time `gorm:"column:created_at" json:"createdAt"` } func (MatchRecord) TableName() string { return "match_records" }