26 lines
878 B
Go
26 lines
878 B
Go
package mysqlmodel
|
|
|
|
// OutfitShare 穿搭分享。
|
|
type OutfitShare struct {
|
|
Model
|
|
ShareUUID string `gorm:"column:share_uuid"` // 分享UUID
|
|
UserID int64 `gorm:"column:user_id"` // 所属用户ID
|
|
OutfitID int64 `gorm:"column:outfit_id"` // 穿搭ID
|
|
Status int8 `gorm:"column:status"` // 分享状态 1=正常 2=用户取消
|
|
}
|
|
|
|
func (OutfitShare) TableName() string {
|
|
return "outfit_shares"
|
|
}
|
|
|
|
// OutfitShareReceiver 穿搭分享接收人关联(访问即视为收到,幂等)。
|
|
type OutfitShareReceiver struct {
|
|
Model
|
|
ShareUUID string `gorm:"column:share_uuid;uniqueIndex:uk_outfit_share_receiver,priority:1"` // 分享UUID
|
|
ReceiverUserID int64 `gorm:"column:receiver_user_id;uniqueIndex:uk_outfit_share_receiver,priority:2"` // 接收人用户ID
|
|
}
|
|
|
|
func (OutfitShareReceiver) TableName() string {
|
|
return "outfit_share_receivers"
|
|
}
|