// 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 }