- Updated `CreateRoleCommand` and `UpdateRoleCommand` to include optional pricing fields: `PricePerConfigPerQuarter` and `PricePerConfigPerYear`. - Modified `RoleEndpoints` to handle the new pricing parameters during role creation and updates. - Enhanced validation logic in `CreateRoleCommandValidator` and `UpdateRoleCommandValidator` to ensure pricing fields are non-negative when provided. - Updated `RoleDto` and `SelectableRoleDto` to include pricing information, ensuring proper data handling in API responses. - Adjusted frontend components to support new pricing fields in role forms and display total costs based on configurations. - Updated API documentation to reflect changes in role management endpoints and pricing structure.
14 lines
373 B
C#
14 lines
373 B
C#
using PnvPanel.Application.Common.Interfaces;
|
|
using PnvPanel.Application.Common.Messaging;
|
|
using PnvPanel.Application.Common.Models;
|
|
|
|
namespace PnvPanel.Application.Admin.Roles;
|
|
|
|
public sealed record UpdateRoleCommand(
|
|
Guid RoleId,
|
|
int MaxConfigs,
|
|
int MaxIpLimit,
|
|
int? PricePerConfigPerQuarter,
|
|
int? PricePerConfigPerYear
|
|
) : ICommand<Result<RoleDto>>;
|