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

50 lines
2.3 KiB

5 years ago
  1. package models
  2. //const RealSignHistoryTN = TableNamePrefix + "real_sign_history"
  3. //type RealSignHistory struct {
  4. // Id int64 `json:"id" xorm:"not null pk autoincr INT(11)"`
  5. // ActivityId int64 `json:"activity_id" xorm:"not null default 0 comment('主活动') INT(11)"`
  6. // UserId int64 `json:"user_id" xorm:"not null default 0 comment('用户id') INT(11)"`
  7. // Nickname string `json:"nickname" xorm:"not null default('') comment('微信昵称') VARCHAR(128)"`
  8. // RehearsalId int64 `json:"rehearsal_id" xorm:"not null default 0 comment('彩排id') INT(11)"`
  9. // Content string `json:"content" xorm:"not null comment('提交审核的内容') TEXT"`
  10. // Status int64 `json:"status" xorm:"not null default 0 comment('是否通过审核') TINYINT(1)"`
  11. // IsDelete int `json:"is_delete" xorm:"not null default(0) comment('是否删除') TINYINT(1)"`
  12. // CreatedAt time.Time `json:"created_at" xorm:"not null created comment('创建时间') DATETIME"`
  13. // UpdatedAt time.Time `json:"updated_at" xorm:"not null updated comment('更新时间') TIMESTAMP"`
  14. //}
  15. //func (t *RealSignHistory) TableName() string {
  16. // return RealSignHistoryTN
  17. //}
  18. //
  19. //func (t *RealSignHistory) Info(uid, aid, rid int64) (bool, error) {
  20. // return core.GetXormAuto().Where("is_delete=0 and user_id=? and activity_id=? and rehearsal_id=?",
  21. // uid, aid, rid).Get(t)
  22. //}
  23. //
  24. //func (t *RealSignHistory) Check(uid, aid, rid int64) (bool, error) {
  25. // return core.GetXormAuto().Where("is_delete=0 and user_id=? and activity_id=? and rehearsal_id=? and status=1",
  26. // uid, aid, rid).Get(t)
  27. //}
  28. //
  29. //func (t *RealSignHistory) UpdateById(ids interface{}, fields ...string) (err error) {
  30. // if len(fields) > 0 {
  31. // _, err = core.GetXormAuto().In("id", ids).Cols(fields...).Update(t)
  32. // } else {
  33. // _, err = core.GetXormAuto().In("id", ids).AllCols().Update(t)
  34. // }
  35. // return err
  36. //}
  37. //func (t *RealSignHistory) Insert() error {
  38. // _, err := core.GetXormAuto().InsertOne(t)
  39. // return err
  40. //}
  41. //
  42. //func GetRealSignHistories(aid interface{}, rid interface{}) ([]*RealSignHistory, error) {
  43. // results := make([]*RealSignHistory, 0)
  44. // err := core.GetXormAuto().Where("is_delete=0 and activity_id=? and rehearsal_id=? and status=0",
  45. // aid, rid).Asc("updated_at").Find(&results)
  46. // return results, err
  47. //}