互动
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

5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
  1. package models
  2. import (
  3. "time"
  4. "github.com/ouxuanserver/osmanthuswine/src/core"
  5. )
  6. const AuctionPlayerTableName = TableNamePrefix + "auction_player"
  7. //竞拍者
  8. type AuctionPlayer struct {
  9. Id int `json:"id" xorm:"not null pk autoincr INT(11)"`
  10. AuctionActivityId int `json:"auction_activity_id" xorm:"not null comment('竞拍活动id') INT(11)"`
  11. UserId int `json:"user_id" xorm:"not null comment('客户的id') INT(11)"`
  12. ArchId int `json:"arch_id" xorm:"not null default 0 comment('归档id') INT(11)"`
  13. RehearsalId int `json:"rehearsal_id" xorm:"not null default(0) comment('彩排id, 0正式数据') INT(11)"`
  14. Code int64 `json:"code" xorm:"not null comment('竞拍参与人的代号') INT(11)"`
  15. IsDelete bool `json:"is_delete" xorm:"not null default(0) comment('软删除') TINYINT(0)"`
  16. CreatedAt time.Time `json:"created_at" xorm:"not null created comment('创建时间') DATETIME"`
  17. UpdatedAt time.Time `json:"updated_at" xorm:"not null updated comment('更新时间') DATETIME"`
  18. }
  19. func (t *AuctionPlayer) TableName() string {
  20. return AuctionPlayerTableName
  21. }
  22. func (t *AuctionPlayer) GetByAuctionIdAndUid(aid, uid, rid int, archId interface{}) (bool, error) {
  23. return core.GetXormAuto().Where("is_delete=0 and auction_activity_id=? and arch_id=? and user_id=? and rehearsal_id=?",
  24. aid, archId, uid, rid).Get(t)
  25. }