36 lines
820 B
Go
36 lines
820 B
Go
package role
|
|
|
|
import "time"
|
|
|
|
type RoleDTO struct {
|
|
Id int64 `json:"id"`
|
|
Code string `json:"code"`
|
|
Name string `json:"name"`
|
|
GuardName string `json:"guardName"`
|
|
CreatedAt time.Time `json:"createdAt"`
|
|
UpdatedAt time.Time `json:"updatedAt"`
|
|
}
|
|
|
|
type CreateRoleDTO struct {
|
|
Code string `json:"code" binding:"required"`
|
|
Name string `json:"name" binding:"required"`
|
|
GuardName string `json:"guardName" binding:"required"`
|
|
}
|
|
|
|
type UpdateRoleDTO struct {
|
|
Code string `json:"code" binding:"required"`
|
|
Name string `json:"name" binding:"required"`
|
|
GuardName string `json:"guardName" binding:"required"`
|
|
}
|
|
|
|
type ListFilter struct {
|
|
RoleName string
|
|
Page int
|
|
Limit int
|
|
}
|
|
|
|
type ListRoleDTO struct {
|
|
Count int64 `json:"count"`
|
|
Roles []RoleDTO `json:"roles"`
|
|
}
|