Add permission and user admin modules with updated user schema

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.
This commit is contained in:
guwandyk committed 2026-07-08 12:48:05 +05:00
1 parent 4d1942d7fe
commit 4350915b30
13 files changed
+3551 -7

No files matched your search

+35
View File
@@ -0,0 +1,35 @@
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"`
}