feat: wecom curd
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
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"`
|
||||
}
|
||||
Reference in New Issue
Block a user