Modularize project structure by splitting responsibilities into distinct files and namespaces. Add helper methods for authentication and JSON operations.
This commit is contained in:
53
Tasks/StoreTasks.Regions.cs
Normal file
53
Tasks/StoreTasks.Regions.cs
Normal file
@@ -0,0 +1,53 @@
|
||||
namespace FsTool.Tasks
|
||||
{
|
||||
public static partial class StoreTasks
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a pickup date and the occupied slots for that date.
|
||||
/// </summary>
|
||||
/// <param name="Date">The pickup date string.</param>
|
||||
/// <param name="OccupiedSlots">The slots already assigned for the date.</param>
|
||||
public record Pickup(string Date, List<Slot> OccupiedSlots);
|
||||
|
||||
/// <summary>
|
||||
/// Describes a booked slot and the profile occupying it.
|
||||
/// </summary>
|
||||
/// <param name="IsConfirmed">Indicates whether the slot is confirmed.</param>
|
||||
/// <param name="Profile">The profile assigned to the slot.</param>
|
||||
public record Slot(bool IsConfirmed, Profile Profile);
|
||||
|
||||
/// <summary>
|
||||
/// Minimal profile information for a store member.
|
||||
/// </summary>
|
||||
/// <param name="Id">The Foodsharing profile identifier.</param>
|
||||
/// <param name="Name">The profile display name.</param>
|
||||
public record Profile(int Id, string Name);
|
||||
|
||||
/// <summary>
|
||||
/// Detailed store member information including verification and team status flags.
|
||||
/// </summary>
|
||||
/// <param name="Id">The member identifier.</param>
|
||||
/// <param name="Name">The member name.</param>
|
||||
/// <param name="Team_Active">The member's active status within the team.</param>
|
||||
/// <param name="Verified">The verification state of the member.</param>
|
||||
public record Member(int Id, string Name, TeamActiveStatus Team_Active, VerifiedStatus Verified);
|
||||
|
||||
/// <summary>
|
||||
/// Indicates whether a team member is active or only available as a jumper.
|
||||
/// </summary>
|
||||
public enum TeamActiveStatus
|
||||
{
|
||||
Jumper = 2,
|
||||
Active = 1,
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Specifies whether a member has completed verification.
|
||||
/// </summary>
|
||||
public enum VerifiedStatus
|
||||
{
|
||||
Unverified = 0,
|
||||
Verified = 1,
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user