|
@@ -7,6 +7,7 @@ import ( |
|
@@ -7,6 +7,7 @@ import ( |
7
|
const (
|
7
|
const (
|
8
|
DepartmentUser = iota //用户所有部门
|
8
|
DepartmentUser = iota //用户所有部门
|
9
|
DepartmentAll //公司所有部门
|
9
|
DepartmentAll //公司所有部门
|
|
|
10
|
+ DepartmentRoot //公司一级部门
|
10
|
)
|
11
|
)
|
11
|
|
12
|
|
12
|
const (
|
13
|
const (
|
|
@@ -59,8 +60,8 @@ type Department struct { |
|
@@ -59,8 +60,8 @@ type Department struct { |
59
|
Name string `orm:"column(name)" json:"name"`
|
60
|
Name string `orm:"column(name)" json:"name"`
|
60
|
PId int `orm:"column(parent_id)" json:"-"`
|
61
|
PId int `orm:"column(parent_id)" json:"-"`
|
61
|
ManagerString string `orm:"column(managers)" json:"-"`
|
62
|
ManagerString string `orm:"column(managers)" json:"-"`
|
62
|
- Relation string `orm:"column(relation)"`
|
|
|
63
|
- CreateTime time.Time `orm:"column(create_time)"`
|
63
|
+ Relation string `orm:"column(relation)" json:"-"`
|
|
|
64
|
+ CreateTime time.Time `orm:"column(create_time)" json:"-"`
|
64
|
Managers []int `json:"-"`
|
65
|
Managers []int `json:"-"`
|
65
|
Departments []*Department `json:"departments,omitempty"`
|
66
|
Departments []*Department `json:"departments,omitempty"`
|
66
|
}
|
67
|
}
|