123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258 |
- // Copyright 2019 github.com. All rights reserved.
- // Use of this source code is governed by github.com.
- package v1
- import (
- "property-system-gateway/param/base"
- "property-system-gateway/pb/v1"
- )
- type LoginBody struct {
- User string `form:"user"`
- Password string `form:"password"`
- }
- type LoginRequest struct {
- base.Header
- LoginBody
- }
- type LoginData struct {
- Uid int64 `json:"uid"`
- Token string `json:"token"`
- User string `json:"user"`
- IsSuper bool `json:"is_super"`
- Company bool `json:"company"`
- OpenimId string `json:"openim_id"`
- GardenName string `json:"garden_name"`
- Permissions []v1.SystemGroupPermissionData `json:"permissions"`
- }
- type LoginResponse struct {
- base.Result
- Data LoginData `json:"data"`
- // 当账号存在多个小区时使用phone_data
- PhoneData LoginByPhoneData `json:"phone_data"`
- }
- type PermissionRegetRequest struct {
- base.Header
- }
- type PermissionRegetResponse struct {
- base.Result
- Data LoginData `json:"data"`
- }
- type TokenRequest struct {
- base.Header
- }
- type TokenResponse struct {
- base.Result
- Data string `json:"data"`
- RefreshToken string `json:"refresh_token"`
- }
- type GetVcodeQuery struct {
- Phone string `form:"phone"`
- }
- type GetVcodeRequest struct {
- GetVcodeQuery
- }
- type GetVcodeResponse struct {
- base.Result
- Data v1.GetVcodeReply `json:"data"`
- }
- type LoginByPhoneBody struct {
- // 短信验证码
- Vcode uint32 `form:"vcode"`
- Phone string `form:"phone"`
- }
- type LoginByPhoneRequest struct {
- base.Header
- LoginByPhoneBody
- }
- type LoginByPhoneItem struct {
- Uid int64 `json:"uid"`
- User string `json:"user"`
- GardenName string `json:"garden_name"`
- GardenId int64 `json:"garden_id"`
- IsSuper bool `json:"is_super"`
- OpenimId string `json:"openim_id"`
- Permissions []v1.SystemGroupPermissionData `json:"permissions"`
- }
- type LoginByPhoneData struct {
- List []LoginByPhoneItem `json:"list"`
- Token string `json:"token"`
- }
- type LoginByPhoneResponse struct {
- base.Result
- Data LoginByPhoneData `json:"data"`
- }
- type ChooseUserQuery struct {
- Id int64 `form:"id" json:"id"`
- }
- type ChooseUserRequest struct {
- base.Header
- ChooseUserQuery
- }
- type ChooseUserResponse struct {
- base.Result
- Data LoginData `json:"data"`
- }
- type ResetPasswordBody struct {
- Phone string `form:"phone" json:"phone"`
- // 用户id,第一次调用时为空,如果电话对应多个账号,选择账号后第二次调用需填该值
- Uid int64 `form:"uid" json:"uid"`
- // 短信验证码
- Vcode uint32 `form:"vcode" json:"vcode"`
- Password string `form:"password" json:"password"`
- }
- type ResetPasswordRequest struct {
- ResetPasswordBody
- }
- type ResetPasswordResponse struct {
- base.Result
- Data v1.ResetPasswordReply `json:"data"`
- }
- type ChangePasswordBody struct {
- OldPassword string `form:"old_password" json:"old_password"`
- NewPassword string `form:"new_password" json:"new_password"`
- }
- type ChangePasswordRequest struct {
- base.Header
- ChangePasswordBody
- }
- type ChangePasswordResponse struct {
- base.Result
- }
- type CompanyEnterGardenRequest struct {
- base.Header
- }
- type CompanyEnterGardenResponse struct {
- base.Result
- Data LoginData `json:"data"`
- }
- type StatisticRequest struct {
- base.Header
- }
- type StatisticResponse struct {
- base.Result
- Data v1.StatisticReply `json:"data"`
- }
- type PersonInfoRequest struct {
- base.Header
- }
- type PersonInfoData struct {
- User string `json:"user"`
- RealName string `json:"real_name"`
- Phone string `json:"phone"`
- Email string `json:"email"`
- Gender int32 `json:"gender"`
- Department string `json:"department"`
- }
- type PersonInfoResponse struct {
- base.Result
- Data PersonInfoData `json:"data"`
- }
- type PersonInfoUpdateBody struct {
- User string `form:"user"json:"user"`
- RealName string `form:"real_name" json:"real_name"`
- Phone string `form:"phone" json:"phone"`
- Email string `form:"email" json:"email"`
- Gender int32 `form:"gender" json:"gender"`
- }
- type PersonInfoUpdateRequest struct {
- base.Header
- PersonInfoUpdateBody
- }
- type PersonInfoUpdateResponse struct {
- base.Result
- }
- type OpenImTokenQuery struct {
- OpenimId string `form:"openim_id" json:"openim_id"`
- }
- type OpenImTokenRequest struct {
- base.Header
- OpenImTokenQuery
- }
- type OpenImTokenResponse struct {
- base.Result
- Data v1.OpenImTokenReply `json:"data"`
- }
- type OpenImUserInfoQuery struct {
- OpenimId string `form:"openim_id" json:"openim_id"`
- }
- type OpenImUserInfoRequest struct {
- base.Header
- OpenImUserInfoQuery
- }
- type OpenImUserData struct {
- NickName string `json:"nick_name"`
- FaceUrl string `json:"face_url"`
- Gender int32 `json:"gender"`
- }
- type OpenImUserInfoResponse struct {
- base.Result
- Data v1.OpenImUserData `json:"data"`
- }
- type OpenImUserSetFaceBody struct {
- OpenimId string `form:"openim_id" json:"openim_id"`
- FaceUrl string `form:"face_url" json:"face_url"`
- }
- type OpenImUsersInfoQuery struct {
- OpenimIds string `form:"openim_ids" json:"openim_ids"`
- }
- type OpenImUsersInfoRequest struct {
- base.Header
- OpenImUsersInfoQuery
- }
- type OpenImUsersInfoResponse struct {
- base.Result
- Data v1.OpenImUserInfoReply `json:"data"`
- }
- type OpenImUserSetFaceRequest struct {
- base.Header
- OpenImUserSetFaceBody
- }
- type OpenImUserSetFaceResponse struct {
- base.Result
- }
|