Enhance role management by adding pricing fields and updating related logic
- 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.
This commit is contained in:
@@ -18,6 +18,14 @@ public class AppRole : IdentityRole<Guid>
|
||||
|
||||
public bool IsSystem { get; set; }
|
||||
|
||||
/// <summary>Справочная цена за конфиг за минимальный период оплаты (3 месяца), в рублях. Только для
|
||||
/// отображения админу — без биллинга/статусов оплаты. У роли `admin` всегда null.</summary>
|
||||
public int? PricePerConfigPerQuarter { get; set; }
|
||||
|
||||
/// <summary>Справочная цена за конфиг за год, в рублях. Задаётся независимо от квартальной цены
|
||||
/// (не производная — позволяет админу задать скидку за годовую оплату). У роли `admin` всегда null.</summary>
|
||||
public int? PricePerConfigPerYear { get; set; }
|
||||
|
||||
public AppRole() { }
|
||||
|
||||
public AppRole(string name)
|
||||
|
||||
Reference in New Issue
Block a user