common.go
3.8 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
package protocol
//RequestPageInfo 分页获取数据
type RequestPageInfo struct {
PageIndex int `json:"pageNumber"`
PageSize int `json:"pageSize"`
}
//ResponsePageInfo 分页信息
type ResponsePageInfo struct {
TotalPage int `json:"totalRow"`
CurrentPage int `json:"pageNumber"`
// ListData interface{} `json:"lists"`
}
type ResponseListData struct {
List interface{} `json:"lists"`
}
// DepartmentBase下拉选择列表-部门
type DepartmentBase struct {
Id int64 `json:"id" orm:"column(id)"`
Name string `json:"name" orm:"column(name)"`
ParentId int64 `json:"parentId" orm:"column(parent_id)"`
}
//RoleBase 下拉选择列表-角色
type RoleBase struct {
Id int64 `json:"id" orm:"column(id)"`
Name string `json:"name" orm:"column(name)"`
IsDefault int8 `json:"is_default" orm:"column(is_default)"`
ParentId int64 `json:"parent_id" orm:"column(pid)"`
Types int8 `json:"types" orm:"column(types)"`
}
//PositionBase 下拉选择列表-职位
type PositionBase struct {
Id int64 `json:"id" orm:"column(id)"`
Name string `json:"name" orm:"column(name)"`
ParentId int64 `json:"parent_id" orm:"column(parent_id)"`
}
//DepartUserBase 下拉选择列表-部门下的人员
type DepartUserBase struct {
UserCompanyId int64 `json:"id" orm:"column(user_company_id)"`
NickName string `json:"name" orm:"column(nick_name)"`
UserId int64 `json:"-" orm:"column(user_id)"`
}
//部门和人员混合
type DepartAndUser struct {
Departments []DepartmentBase `json:"departments"`
Members []DepartmentMember `json:"members"`
}
type UserInfoBase struct {
UserCompanyId int64 `json:"user_company_id"`
Name string `json:"name"`
Phone string `json:"phone"`
Status int8 `json:"status"`
}
type RoleHasUser struct {
UserCompanyId int64 `json:"user_company_id" orm:"column(user_company_id)"`
Name string `json:"name" orm:"column(nick_name)"`
}
//下拉选择框的内容模板 -机会二级分类
type TemplateBase struct {
TemplateId int64 `orm:"column(template_id)" json:"template_id"`
ChanceTypeId int64 `orm:"column(chance_type_id)" json:"chance_type_id"`
Name string `orm:"column(name)" json:"name"`
}
//下拉选择框的内容机会分类 - 机会一级分类
type ChanceTypeBase struct {
ChanceTypeId int64 `orm:"column(chance_type_id)" json:"chance_type_id"`
Name string `orm:"column(name)" json:"name"`
}
type SelectCompanyUserListItem struct {
Id int64 `json:"id" orm:"column(id)"`
UserCompanyId int64 `json:"user_company_id" orm:"column(user_company_id)"`
NickName string `json:"nick_name" orm:"column(nick_name)"`
DepartmentId int64 `json:"department_id" orm:"column(department_id)"`
DepartmentName string `json:"department_name" orm:"column(department_name)"`
}
//下拉选择公司员工
type SelectCompanyUserList struct {
ResponsePageInfo
List []SelectCompanyUserListItem `json:"lists"`
}
type SelectChanceListItem struct {
Id string `json:"id" orm:"column(id)"`
DepartmentId int64 `json:"deparment_id" orm:"column(department_id)"`
DepartmentName string `json:"department_name" orm:"-"`
ChanceTypeId int `json:"chance_type_id" orm:"column(chance_type_id)"`
ChanceTypeName string `json:"chance_type_name" orm:"-"`
AuditTemplateId int64 `json:"audit_template_id" orm:"column(audit_template_id)"`
AuditTemplateName string `json:"audit_template_name" orm:"-"`
UserId int64 `json:"user_id" orm:"column(user_id)"`
UserName string `json:"user_name" orm:"column(-)"`
Code string `json:"code" orm:"column(code)"`
CreateAt string `json:"create_at" orm:"column(create_at)"`
}
//下拉选择机会
type SelectChanceList struct {
ResponsePageInfo
List []SelectChanceListItem `json:"lists"`
}