66 lines
1.9 KiB
Go
66 lines
1.9 KiB
Go
package proto
|
|
|
|
// BaseResponse 基础返回结构
|
|
type BaseResponse struct {
|
|
Code int `json:"code"`
|
|
Message string `json:"message"`
|
|
Data interface{} `json:"result,omitempty"`
|
|
Status string `json:"type,omitempty"`
|
|
Err error `json:"error,omitempty"` // 错误堆栈
|
|
//Page int64 `json:"page,omitempty"` //当前页码
|
|
//PageSize int64 `json:"pageSize,omitempty"` // 单页显示记录数--前端参数2
|
|
//PageCount int64 `json:"totalPage,omitempty"` // 总页数
|
|
//TotalSize int64 `json:"total,omitempty"` // 总记录数
|
|
}
|
|
|
|
type UserLoginResponse struct {
|
|
UserId int64 `json:"userId"`
|
|
Token string `json:"token"`
|
|
RealName string `json:"realName"`
|
|
UserName string `json:"userName"`
|
|
Roles []RoleItem `json:"roles"`
|
|
Avatar string `json:"avatar"`
|
|
Desc string `json:"desc"`
|
|
HomePath string `json:"homePath"`
|
|
}
|
|
|
|
type RoleItem struct {
|
|
RoleId int64 `json:"roleId"`
|
|
RoleName string `json:"roleName"`
|
|
Value string `json:"value"`
|
|
}
|
|
|
|
type OwnerItem struct {
|
|
OwnerId int `json:"ownerId"`
|
|
OwnerName string `json:"ownerName"`
|
|
ChargeUser string `json:"chargeUser"`
|
|
Phone string `json:"phone"`
|
|
}
|
|
|
|
type UploadResponse struct {
|
|
Url string `json:"url"`
|
|
}
|
|
|
|
type OwnerProjectItem struct {
|
|
OwnerId int `json:"key"`
|
|
OwnerName string `json:"title"`
|
|
ProjectList []ProjectItem `json:"children"`
|
|
}
|
|
|
|
type ProjectItem struct {
|
|
ProjectId string `json:"key"`
|
|
ProjectName string `json:"title"`
|
|
}
|
|
|
|
type DatasetItem struct {
|
|
DatasetId int64 `json:"datasetId"`
|
|
DatasetName string `json:"datasetName"`
|
|
DatasetDesc string `json:"datasetDesc"`
|
|
CategoryId int `json:"categoryId"`
|
|
ProjectId int64 `json:"projectId"`
|
|
OwnerId int64 `json:"ownerId"`
|
|
Creator int64 `json:"creator"`
|
|
CreateAt int64 `json:"createAt"`
|
|
DatasetCount int64 `json:"datasetCount"`
|
|
}
|