-
Notifications
You must be signed in to change notification settings - Fork 156
/
user.go
95 lines (89 loc) · 2.73 KB
/
user.go
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
package models
import (
"github.com/ArtisanCloud/PowerWeChat/v3/src/kernel/contract"
"github.com/ArtisanCloud/PowerWeChat/v3/src/kernel/models"
)
const (
CALLBACK_EVENT_CHANGE_CONTACT = "change_contact"
CALLBACK_EVENT_CHANGE_TYPE_CREATE_USER = "create_user"
CALLBACK_EVENT_CHANGE_TYPE_UPDATE_USER = "update_user"
CALLBACK_EVENT_CHANGE_TYPE_DELETE_USER = "delete_user"
)
type EventUserCreate struct {
contract.EventInterface
models.CallbackMessageHeader
ChangeType string `xml:"ChangeType"`
UserID string `xml:"UserID"`
Name string `xml:"Name"`
Department string `xml:"Department"`
MainDepartment string `xml:"MainDepartment"`
IsLeaderInDept string `xml:"IsLeaderInDept"`
Position string `xml:"Position"`
Mobile string `xml:"Mobile"`
Gender string `xml:"Gender"`
Email string `xml:"Email"`
Status string `xml:"Status"`
Avatar string `xml:"Avatar"`
Alias string `xml:"Alias"`
Telephone string `xml:"Telephone"`
Address string `xml:"Address"`
ExtAttr struct {
Text string `xml:",chardata"`
Item []struct {
Chardata string `xml:",chardata"`
Name string `xml:"Name"`
Type string `xml:"Type"`
Text struct {
Text string `xml:",chardata"`
Value string `xml:"Value"`
} `xml:"Text"`
Web struct {
Text string `xml:",chardata"`
Title string `xml:"Title"`
URL string `xml:"Url"`
} `xml:"Web"`
} `xml:"Item"`
} `xml:"ExtAttr"`
}
type EventUserUpdate struct {
contract.EventInterface
models.CallbackMessageHeader
ChangeType string `xml:"ChangeType"`
UserID string `xml:"UserID"`
NewUserID string `xml:"NewUserID"`
Name string `xml:"Name"`
Department string `xml:"Department"`
MainDepartment string `xml:"MainDepartment"`
IsLeaderInDept string `xml:"IsLeaderInDept"`
Position string `xml:"Position"`
Mobile string `xml:"Mobile"`
Gender string `xml:"Gender"`
Email string `xml:"Email"`
Status string `xml:"Status"`
Avatar string `xml:"Avatar"`
Alias string `xml:"Alias"`
Telephone string `xml:"Telephone"`
Address string `xml:"Address"`
ExtAttr struct {
Text string `xml:",chardata"`
Item []struct {
Chardata string `xml:",chardata"`
Name string `xml:"Name"`
Type string `xml:"Type"`
Text struct {
Text string `xml:",chardata"`
Value string `xml:"Value"`
} `xml:"Text"`
Web struct {
Text string `xml:",chardata"`
Title string `xml:"Title"`
URL string `xml:"Url"`
} `xml:"Web"`
} `xml:"Item"`
} `xml:"ExtAttr"`
}
type EventUserDelete struct {
contract.EventInterface
models.CallbackMessageHeader
UserID string `xml:"UserID"`
}