27 lines
678 B
Go
27 lines
678 B
Go
package api
|
|
|
|
type LoginAccountRequest struct {
|
|
Username string `json:"username" validate:"required"`
|
|
Password string `json:"password" validate:"required"`
|
|
}
|
|
|
|
type LoginAccountResponse struct {
|
|
Account Account `json:"account"`
|
|
Token string `json:"token"`
|
|
}
|
|
|
|
type Account struct {
|
|
Id int `json:"id"`
|
|
Username string `json:"username"`
|
|
RoleId int `json:"role_id"`
|
|
CreatedAt string `json:"created_at"`
|
|
UpdatedAt string `json:"updated_at"`
|
|
}
|
|
|
|
type GetAccountResponse struct {
|
|
Id int `json:"id"`
|
|
Username string `json:"username"`
|
|
RoleId int `json:"role_id"`
|
|
CreatedAt string `json:"created_at"`
|
|
UpdatedAt string `json:"updated_at"`
|
|
}
|