互动
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
1.3 KiB

package models
import (
"github.com/ouxuanserver/osmanthuswine/src/core"
"time"
)
const AuctionPlayerTableName = TableNamePrefix + "auction_player"
//竞拍者
type AuctionPlayer struct {
Id int64 `json:"id" xorm:"not null pk autoincr INT(11)"`
AuctionActivityId int64 `json:"auction_activity_id" xorm:"not null comment('竞拍活动id') INT(11)"`
UserId int64 `json:"user_id" xorm:"not null comment('客户的id') INT(11)"`
RehearsalId int64 `json:"rehearsal_id" xorm:"not null default(0) comment('彩排id, 0正式数据') INT(11)"`
Code int64 `json:"code" xorm:"not null comment('竞拍参与人的代号') INT(11)"`
IsDelete bool `json:"is_delete" xorm:"not null default(0) comment('软删除') TINYINT(0)"`
CreatedAt time.Time `json:"created_at" xorm:"not null created comment('创建时间') DATETIME"`
UpdatedAt time.Time `json:"updated_at" xorm:"not null updated comment('更新时间') DATETIME"`
}
func (t *AuctionPlayer) TableName() string {
return AuctionPlayerTableName
}
func (t *AuctionPlayer) GetByAuctionIdAndUid(aid, uid, rid int64) (bool, error) {
return core.GetXormAuto().Where("is_delete=0 and auction_activity_id=? and user_id=? and rehearsal_id=?",
aid, uid, rid).Get(t)
}