Split user name into first_name/last_name/name and rename phone_number to phone; add permissions table and register the new permission/user handlers.
36 lines
898 B
Go
36 lines
898 B
Go
package permission
|
|
|
|
import "time"
|
|
|
|
type PermissionDTO 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 CreatePermissionDTO struct {
|
|
Code string `json:"code" binding:"required"`
|
|
Name string `json:"name" binding:"required"`
|
|
GuardName string `json:"guardName" binding:"required"`
|
|
}
|
|
|
|
type UpdatePermissionDTO struct {
|
|
Code string `json:"code" binding:"required"`
|
|
Name string `json:"name" binding:"required"`
|
|
GuardName string `json:"guardName" binding:"required"`
|
|
}
|
|
|
|
type ListFilter struct {
|
|
PermissionName string
|
|
Page int
|
|
Limit int
|
|
}
|
|
|
|
type ListPermissionDTO struct {
|
|
Count int64 `json:"count"`
|
|
Permissions []PermissionDTO `json:"permissions"`
|
|
}
|