95 lines
3.0 KiB
Go
95 lines
3.0 KiB
Go
package system
|
|
|
|
import (
|
|
"github.com/gogf/gf/v2/frame/g"
|
|
commonApi "github.com/tiger1103/gfast/v3/api/v1/common"
|
|
"github.com/tiger1103/gfast/v3/internal/app/system/consts"
|
|
"github.com/tiger1103/gfast/v3/internal/app/system/model"
|
|
"github.com/tiger1103/gfast/v3/internal/app/system/model/entity"
|
|
)
|
|
|
|
// TenantListReq 租户搜索请求参数
|
|
type TenantListReq struct {
|
|
g.Meta `path:"/tenant/list" tags:"租户管理" method:"get" summary:"租户列表"`
|
|
TenantType consts.TenantType `p:"tenantType"`
|
|
CityCode string `p:"cityCode"`
|
|
TenantName string `p:"tenantName"`
|
|
commonApi.PageReq
|
|
commonApi.Author
|
|
}
|
|
|
|
type TenantListRes struct {
|
|
g.Meta `mime:"application/json"`
|
|
List []*model.TenantUserRes `json:"list"`
|
|
ImgAddressPrefix string `json:"imgAddressPrefix"`
|
|
commonApi.ListRes
|
|
}
|
|
|
|
// TenantAddReq 添加租户参数
|
|
type TenantAddReq struct {
|
|
g.Meta `path:"/tenant/add" tags:"租户管理" method:"post" summary:"租户添加"`
|
|
UserNickname string `p:"userNickname"`
|
|
Mobile string `p:"mobile"`
|
|
UserName string `p:"userName"`
|
|
UserPassword string `p:"userPassword"`
|
|
TenantName string `p:"tenantName"`
|
|
TenantType consts.TenantType `p:"tenantType"`
|
|
CityCode string `p:"cityCode"`
|
|
BusinessLicense string `p:"businessLicense"`
|
|
UserSalt string `p:"-"`
|
|
commonApi.Author
|
|
}
|
|
|
|
type TenantAddRes struct {
|
|
}
|
|
|
|
// TenantEditReq 修改租户参数
|
|
type TenantEditReq struct {
|
|
g.Meta `path:"/tenant/edit" tags:"租户管理" method:"put" summary:"租户修改"`
|
|
Id int64 `p:"id" v:"required#租户id不能为空"`
|
|
TenantName string `p:"tenantName"`
|
|
TenantType consts.TenantType `p:"tenantType"`
|
|
CityCode string `p:"cityCode"`
|
|
BusinessLicense string `p:"businessLicense"`
|
|
commonApi.Author
|
|
}
|
|
|
|
type TenantEditRes struct {
|
|
}
|
|
|
|
// GetTenantDetailsByIdsReq 获取多个租户详情请求参数
|
|
type GetTenantDetailsByIdsReq struct {
|
|
g.Meta `path:"/tenant/getTenantDetailsByIds" tags:"租户管理" method:"get" summary:"获取多个租户详情"`
|
|
TenantIds []uint64 `p:"tenantIds"`
|
|
commonApi.Author
|
|
}
|
|
|
|
type GetTenantDetailsByIdsRes struct {
|
|
g.Meta `mime:"application/json"`
|
|
List []*model.TenantRes `json:"list"`
|
|
}
|
|
|
|
// GetTenantDetailsReq 获取租户详情请求参数
|
|
type GetTenantDetailsReq struct {
|
|
g.Meta `path:"/tenant/getTenantDetails" tags:"租户管理" method:"get" summary:"获取租户详情"`
|
|
TenantId uint64 `p:"tenantId"`
|
|
commonApi.Author
|
|
}
|
|
|
|
type GetTenantDetailsRes struct {
|
|
g.Meta `mime:"application/json"`
|
|
Tenant *entity.Tenant `json:"tenant"`
|
|
}
|
|
|
|
// GetTenantListReq 获取租户列表请求参数
|
|
type GetTenantListReq struct {
|
|
g.Meta `path:"/tenant/getTenantList" tags:"租户管理" method:"get" summary:"获取租户列表"`
|
|
TenantId uint64 `p:"tenantId"`
|
|
commonApi.Author
|
|
}
|
|
|
|
type GetTenantListRes struct {
|
|
g.Meta `mime:"application/json"`
|
|
List []entity.Tenant `json:"list"`
|
|
}
|