package permissionrole import "time" type PermissionRoleDTO struct { Id int64 `json:"id"` RoleId int64 `json:"roleId"` RoleName string `json:"roleName"` PermissionId int64 `json:"permissionId"` PermissionName string `json:"permissionName"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` } // SetRolePermissionsDTO replaces a role's whole permission set: after the // call, the role is assigned exactly PermissionIds - pairs not listed are // removed, pairs listed but missing are added, and pairs already present // are left as-is. An empty PermissionIds clears all permissions from the // role. This is the only way to attach/update a role's permissions - there // is no single-pair create endpoint. type SetRolePermissionsDTO struct { RoleId int64 `json:"roleId" binding:"required"` PermissionIds []int64 `json:"permissionIds" binding:"required"` }