123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132 |
- // Copyright 2019 github.com. All rights reserved.
- // Use of this source code is governed by github.com.
- package v1
- import (
- "cp-organization-management-gateway/param/base"
- "cp-organization-management-gateway/pb/v1"
- )
- type LoginBody struct {
- Key string `form:"key"`
- 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"`
- RefreshToken string `json:"refresh_token"`
- Organization string `json:"organization"`
- }
- type LoginResponse 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 UserCreateBody struct {
- // 账户名
- Username string `form:"username" json:"username"`
- Password string `form:"password" json:"password"`
- Phone string `form:"phone" json:"phone"`
- Email string `form:"email" json:"email"`
- GroupId int64 `form:"group_id" json:"group_id"`
- Zones string `form:"zones" json:"zones"`
- // 姓名
- Name string `form:"name" json:"name"`
- }
- type UserCreateRequest struct {
- base.Header
- UserCreateBody
- }
- type UserCreateResponse struct {
- base.Result
- Data v1.CreateManagementUserReply `json:"data"`
- }
- type UserUpdateBody struct {
- // 账户名
- Username string `form:"username" json:"username"`
- Password string `form:"password" json:"password"`
- Phone string `form:"phone" json:"phone"`
- Email string `form:"email" json:"email"`
- GroupId int64 `form:"group_id" json:"group_id"`
- Zones string `form:"zones" json:"zones"`
- // 姓名
- Name string `form:"name" json:"name"`
- Id int64 `form:"id" json:"id"`
- }
- type UserUpdateRequest struct {
- base.Header
- UserUpdateBody
- }
- type UserUpdateResponse struct {
- base.Result
- }
- type UserDelPath struct {
- Id int64 `uri:"id"`
- }
- type UserDelRequest struct {
- base.Header
- UserDelPath
- }
- type UserDelResponse struct {
- base.Result
- }
- type UserListQuery struct {
- Page int64 `form:"page" json:"page"`
- PageSize int64 `form:"page_size" json:"page_size"`
- Name string `form:"name"`
- Zone string `form:"zone"`
- }
- type UserListRequest struct {
- base.Header
- UserListQuery
- }
- type UserListResponse struct {
- base.Result
- Data v1.UserListReply `json:"data"`
- }
- type UserInfoPath struct {
- Id int64 `uri:"id"`
- }
- type UserInfoRequest struct {
- base.Header
- UserInfoPath
- }
- type UserInfoResponse struct {
- base.Result
- Data v1.UserInfoReply `json:"data"`
- }
|