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.
31 lines
1.4 KiB
31 lines
1.4 KiB
package models
|
|
|
|
import (
|
|
"time"
|
|
|
|
"git.ouxuan.net/tommy/osmanthuswine/src/core"
|
|
)
|
|
|
|
const AuctionPlayerTableName = TableNamePrefix + "auction_player"
|
|
|
|
//竞拍者
|
|
type AuctionPlayer struct {
|
|
Id int `json:"id" xorm:"not null pk autoincr INT(11)"`
|
|
AuctionActivityId int `json:"auction_activity_id" xorm:"not null comment('竞拍活动id') INT(11)"`
|
|
UserId int `json:"user_id" xorm:"not null comment('客户的id') INT(11)"`
|
|
ArchId int `json:"arch_id" xorm:"not null default 0 comment('归档id') INT(11)"`
|
|
RehearsalId int `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 int, archId interface{}) (bool, error) {
|
|
return core.GetXormAuto().Where("is_delete=0 and auction_activity_id=? and arch_id=? and user_id=? and rehearsal_id=?",
|
|
aid, archId, uid, rid).Get(t)
|
|
}
|