Enhance school simulation and management by integrating roster functionality, allowing for the installation and persistence of student and staff data. Update the school architecture to include a roster alongside existing components, ensuring proper validation against map layouts. Revise room definitions to support homeroom designations and update related tests to validate new functionalities and ensure robustness in roster handling.
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
using HSchool.People;
|
||||
|
||||
namespace HSchool.Simulation;
|
||||
|
||||
/// <summary>Identity, the one layer every person has.</summary>
|
||||
public readonly record struct PersonIdentity(
|
||||
string Id,
|
||||
string FamilyId,
|
||||
bool Female,
|
||||
DateTime BirthDate,
|
||||
PersonName Name);
|
||||
|
||||
/// <summary>Height, weight and categorical body attributes including derived <c>Build</c>.</summary>
|
||||
public readonly record struct PersonBody(
|
||||
IReadOnlyDictionary<string, int> Numbers,
|
||||
IReadOnlyDictionary<string, string> Choices);
|
||||
|
||||
public readonly record struct PersonSkills(IReadOnlyDictionary<string, int> Values);
|
||||
|
||||
public readonly record struct PersonTraits(IReadOnlyList<string> Ids);
|
||||
|
||||
/// <summary>Live need values. The dictionary is mutated in place as the clock advances.</summary>
|
||||
public readonly record struct PersonNeeds(Dictionary<string, float> Values);
|
||||
|
||||
public readonly record struct PersonRoles(
|
||||
bool IsStudent,
|
||||
bool IsStaff,
|
||||
bool IsParent,
|
||||
string? ClassId,
|
||||
string? Position,
|
||||
string? WorkplaceRoomId);
|
||||
|
||||
/// <summary>A roster class: year and letter live here, the room is the homeroom they occupy.</summary>
|
||||
public readonly record struct ClassIdentity(
|
||||
string Id,
|
||||
int Year,
|
||||
string Letter,
|
||||
string RoomId,
|
||||
int Capacity);
|
||||
Reference in New Issue
Block a user