user_email.go 892 B

1234567891011121314151617
  1. package models
  2. import "time"
  3. type UserEmail struct {
  4. ID int `xorm:"id int unsigned not null pk autoincr"`
  5. UserID int `xorm:"user_id int not null index('idx_eid') index comment('用户id')"`
  6. EmailID int `xorm:"email_id not null index('idx_eid') index comment('信件id')"`
  7. IsRead int8 `xorm:"is_read tinyint(1) comment('是否已读')" json:"is_read"`
  8. GroupId int `xorm:"group_id int notnull default(0) comment('分组id')'" json:"group_id"`
  9. Status int8 `xorm:"status tinyint(4) notnull default(0) comment('0未发送或收件,1已发送,2发送失败,3删除 4草稿 5广告')" json:"status"` // 0未发送或收件,1已发送,2发送失败 3删除 4草稿箱(Drafts) 5骚扰邮件(Junk)
  10. Created time.Time `xorm:"create datetime created index('idx_create_time')"`
  11. }
  12. func (p UserEmail) TableName() string {
  13. return "user_email"
  14. }