activity_special_meeting_detail.go 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. package models
  2. import (
  3. "github.com/beego/beego/v2/client/orm"
  4. "time"
  5. )
  6. type CygxActivitySpecialMeetingDetail struct {
  7. Id int `orm:"column(id);pk"`
  8. UserId int `description:"用户id"`
  9. ActivityId int `description:"活动ID"`
  10. CreateTime time.Time `description:"创建时间"`
  11. Mobile string `description:"手机号"`
  12. Email string `description:"邮箱号"`
  13. CompanyId int `description:"公司ID"`
  14. CompanyName string `description:"公司名称"`
  15. IsMeeting int `description:"是否到会 1.是 ,0否"`
  16. IsAirborne int `description:"是否属于空降 1.是 ,0否"`
  17. RealName string `description:"真实姓名"`
  18. }
  19. // 添加
  20. func AddCygxActivitySpecialMeetingDetail(item *CygxActivitySpecialMeetingDetail) (err error) {
  21. o := orm.NewOrm()
  22. _, err = o.Insert(item)
  23. return
  24. }
  25. // 取消
  26. func CancelCygxActivitySpecialMeetingDetail(uid, activityId int) (err error) {
  27. o := orm.NewOrm()
  28. sql := `DELETE FROM cygx_activity_special_meeting_detail WHERE user_id=? AND activity_id=? `
  29. _, err = o.Raw(sql, uid, activityId).Exec()
  30. return
  31. }