32 lines
791 B
Go
32 lines
791 B
Go
package responses
|
|
|
|
type BodyRegisterResponse struct {
|
|
ID string `json:"id"`
|
|
}
|
|
|
|
type BodyLoginResponse struct {
|
|
Token string `json:"token"`
|
|
}
|
|
|
|
// RoleItem represents a role assigned to the user in the profile response.
|
|
type RoleItem struct {
|
|
ID string `json:"id"`
|
|
Name string `json:"name"`
|
|
Description string `json:"description"`
|
|
}
|
|
|
|
type UserInfoResponse struct {
|
|
ID string `json:"id"`
|
|
Username string `json:"username"`
|
|
Email string `json:"email"`
|
|
FullName string `json:"fullName"`
|
|
IsActive bool `json:"isActive"`
|
|
}
|
|
|
|
// BodyProfileResponse is the response body for GET /profile.
|
|
type BodyProfileResponse struct {
|
|
Info UserInfoResponse `json:"info"`
|
|
Roles []RoleItem `json:"roles"`
|
|
Permissions []string `json:"permissions"`
|
|
}
|