rule.go 706 B

123456789101112131415
  1. package models
  2. type Rule struct {
  3. Id int `xorm:"id int unsigned not null pk autoincr" json:"id"`
  4. UserId int `xorm:"user_id notnull default(0) comment('用户id')" json:"user_id"`
  5. Name string `xorm:"name notnull default('') comment('规则名称')" json:"name"`
  6. Value string `xorm:"value text comment('规则内容')" json:"value"`
  7. Action int `xorm:"action notnull default(0) comment('执行动作,1已读,2转发,3删除')" json:"action"`
  8. Params string `xorm:"params notnull default('') comment('执行参数')" json:"params"`
  9. Sort int `xorm:"sort notnull default(0) comment('排序,越大约优先')" json:"sort"`
  10. }
  11. func (p *Rule) TableName() string {
  12. return "rule"
  13. }