group.go 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. package datamodels
  2. import "time"
  3. // Group Account Data Model
  4. type Group struct {
  5. OcId int64 `json:"ocId" xorm:"'oc_id' bigint not null pk comment('公司组织ID') " `
  6. GroupId int64 `json:"groupId" xorm:"'group_id' bigint not null pk comment('群组ID') " `
  7. GroupName string `json:"groupName" xorm:"'group_name' varchar(127) not null comment('群组名称') " `
  8. GroupCatId int64 `json:"groupCatId" xorm:"'group_cat_id' bigint not null comment('群组类型ID') " `
  9. GroupCatTitle string `json:"groupCatTitle" xorm:"'group_cat_title' varchar(127) not null comment('群组类型名称') " `
  10. GroupPath string `json:"groupPath" xorm:"'group_path' varchar(255) not null comment('群组PATH') " `
  11. GroupDesc string `json:"groupDesc" xorm:"'group_desc' varchar(255) not null comment('群组DESC') " `
  12. GroupCode string `json:"groupCode" xorm:"'group_code' varchar(127) not null comment('群组CODE') " `
  13. GroupSelect string `json:"groupSelect" xorm:"'group_select' varchar(255) not null comment('群组PATH') " `
  14. RootId int64 `json:"rootId" xorm:"'root_id' bigint not null comment('Order') " `
  15. ParentId int64 `json:"parentId" xorm:"'parent_id' bigint not null comment('父群组ID') " `
  16. NodeLeft int64 `json:"nodeLeft" xorm:"'node_left' bigint not null comment('群组LEFT') " `
  17. NodeRight int64 `json:"nodeRight" xorm:"'node_right' bigint not null comment('群组RIGHT') " `
  18. NodeLevel int64 `json:"nodeLevel" xorm:"'node_level' bigint not null comment('群组LEVEL') " `
  19. IsLeaf int64 `json:"isLeaf" xorm:"'is_leaf' bigint not null comment('LEAF群组') " `
  20. IsFixed int64 `json:"isFixed" xorm:"'is_fixed' bigint not null comment('群组STATUS') " `
  21. CreatedBy int64 `json:"createdBy" xorm:"'created_by' " `
  22. CreatedAt time.Time `json:"createdAt" xorm:"'created_at' " `
  23. UpdatedBy int64 `json:"updatedBy" xorm:"'updated_by' " `
  24. UpdatedAt time.Time `json:"updatedAt" xorm:"'updated_at' " `
  25. DeletedFlag int64 `json:"deletedFlag" xorm:"'deleted_flag'" `
  26. DeletedBy int64 `json:"deletedBy" xorm:"'deleted_by' " `
  27. DeletedAt time.Time `json:"deletedAt" xorm:"'deleted_at' " `
  28. }
  29. // TableName table name
  30. func (t *Group) TableName() string {
  31. return "s_group"
  32. }