Enhance staffing management in school simulation by introducing API endpoints for hiring staff and assigning subjects. Implement payroll cap validation to ensure hiring and subject assignments do not exceed the allocated budget. Update the simulation options to include a monthly payroll cap and revise related classes to support new staffing functionalities. Enhance documentation to reflect these changes and update tests to validate the new features.

This commit is contained in:
Leonid Pershin
2026-08-19 00:19:09 +03:00
parent c189578680
commit 94842ab192
24 changed files with 1444 additions and 27 deletions
+19
View File
@@ -1,4 +1,5 @@
using HSchool.Content;
using HSchool.People;
using HSchool.Server.Api;
using HSchool.Simulation;
@@ -50,4 +51,22 @@ internal abstract record GameCommand
string PersonId,
string Locale,
TaskCompletionSource<PersonCardResult> Result) : GameCommand;
internal sealed record HireStaff(
int SchoolId,
string PersonId,
string Position,
TaskCompletionSource<StaffingOutcome> Result) : GameCommand;
internal sealed record AssignSubject(
int SchoolId,
string PersonId,
string Subject,
TaskCompletionSource<StaffingOutcome> Result) : GameCommand;
internal sealed record UnassignSubject(
int SchoolId,
string PersonId,
string Subject,
TaskCompletionSource<StaffingOutcome> Result) : GameCommand;
}