group.go 468 B

123456789101112
  1. package models
  2. type Group struct {
  3. ID int `xorm:"id int unsigned not null pk autoincr" json:"id"`
  4. Name string `xorm:"varchar(10) notnull default('') comment('分组名称')" json:"name"`
  5. ParentId int `xorm:"parent_id int unsigned notnull default(0) comment('父分组名称')" json:"parent_id"`
  6. UserId int `xorm:"user_id int unsigned notnull default(0) comment('用户id')" json:"-"`
  7. }
  8. func (p *Group) TableName() string {
  9. return "group"
  10. }