company.go
2.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
package protocol
//RequestDepartmentAdd 部门设置
type RequestDepartmentAdd struct {
CompanyID int64 `json:"company_id"` //公司
Name string `json:"name"` //部门名字
ParentID int64 `json:"parent_id"` //父级部门Id
Managers []int64 `json:"manages"` //主管userid
}
//ResponseDepartmentInfo ...
type ResponseDepartmentInfo struct {
ID int64 `json:"id`
CompanyID int64 `json:"company_id"` //公司
Name string `json:"name"` //部门名字
ParantID int64 `json:"parant_id"` //父级部门Id
Manages []DepartmentManager `json:"manages"` //部门管理员
Member int `json:"member"` //成员数
ParantName string `json:"parant_name"` //父级部门名字
}
type DepartmentManager struct {
UserId int `json:"user_id"`
Name string `json:"name`
}
//RequestDepartmentEdit 编辑
type RequestDepartmentEdit struct {
ID int64 `json:"id"`
RequestDepartmentAdd
}
//RequestDepartmentDelete ...
type RequestDepartmentDelete struct {
IDs []int64 `json:"ids"`
CompanyID int64 `json:"company_id"` //公司
}
//ResponseDepartmentList ....
type ResponseDepartmentList struct {
List []ResponseDepartmentInfo
}
//RequestPositionAdd 添加职位
type RequestPositionAdd struct {
CompanyID int64 `json:"company_id"`
Name string `json:"name"`
ParentID int64 `json:"parent_id"`
}
//RequestPositionEdit 编辑职位
type RequestPositionEdit struct {
ID int64 `json:"id"`
RequestPositionAdd
}
//ResponsePositionInfo ...
type ResponsePositionInfo struct {
ID int64 `json:"id"`
CompanyID int64 `json:"company_id"`
Name string `json:"name"`
ParentID int64 `json:"parent_id"`
ParemtName string `json:"parent_name`
CreateTime int64 `json:"create_time`
}
type RequestPositionDelete struct {
CompanyID int64 `json:"company_id"`
IDs []int64 `json:"ids"`
}
type RequestUserAdd struct {
Name string `json:"name"`
CompanyId int64 `json:"company_id"`
Phone string `json:"phone`
Departments []int64 `json:"departments"`
Positions []int64 `json:"positions"`
Roles []int64 `json:"roles"`
}
type RequestUserEdit struct {
ID int64 `json:"id"`
RequestUserAdd
// Name string `json:"name"`
// CompanyId int64 `json:"company_id"`
// Phone string `json:"phone`
// Departments []int `json:"departments"`
// Positions []int `json:"positions"`
// Roles []int `json:"roles"`
}