34 lines
792 B
Go
34 lines
792 B
Go
package user
|
|
|
|
import "lone-services/pkg/wecom/auth"
|
|
|
|
type Client struct {
|
|
auth *auth.Client
|
|
}
|
|
|
|
func NewClient(authClient *auth.Client) *Client {
|
|
return &Client{auth: authClient}
|
|
}
|
|
|
|
type CreateRequest struct {
|
|
UserId string `json:"userid"`
|
|
Name string `json:"name"`
|
|
Mobile string `json:"mobile"`
|
|
AvatarMediaID string `json:"avatar_mediaid,omitempty"`
|
|
Enable int `json:"enable"`
|
|
Department []int `json:"department"`
|
|
}
|
|
|
|
type UpdateRequest struct {
|
|
UserId string `json:"userid"`
|
|
Name string `json:"name"`
|
|
Mobile string `json:"mobile"`
|
|
AvatarMediaID string `json:"avatar_mediaid,omitempty"`
|
|
Enable int `json:"enable"`
|
|
}
|
|
|
|
type apiResponse struct {
|
|
ErrCode int `json:"errcode"`
|
|
ErrMsg string `json:"errmsg"`
|
|
}
|