using System.Text.Json.Serialization; namespace FsToolbox.Cli.Tasks { public static partial class StoreTasks { #region Record StoreInformation /// /// Store information including the calendar interval for automatic slot creation. /// /// The store identifier. /// The store name. /// Interval in seconds before a slot's time when it is automatically created. public record StoreInformation(int Id, string Name, int CalendarInterval); #endregion #region Record Member /// /// Detailed store member information including verification and team status flags. /// /// The member identifier. /// The member name. /// The member's active status within the team. /// The verification state of the member. public record Member(int Id, string Name, TeamActiveStatus Team_Active, VerifiedStatus Verified); #endregion #region Record FoodsaverProfile /// /// Minimal foodsaver profile information for store logs. /// /// The foodsaver identifier. /// The foodsaver display name. /// The foodsaver avatar URL (relative). /// Indicates whether the foodsaver is sleeping. public record FoodsaverProfile(int Id, string Name, string? Avatar, bool IsSleeping); #endregion #region Record StoreLogEntry /// /// Represents a store log entry with foodsaver and action information. /// public record StoreLogEntry( [property: JsonPropertyName("performed_at")] DateTime PerformedAt, [property: JsonPropertyName("action_id")] int ActionId, [property: JsonPropertyName("date_reference")] DateTime? DateReference, [property: JsonPropertyName("content")] string? Content, [property: JsonPropertyName("reason")] string? Reason, [property: JsonPropertyName("acting_foodsaver")] FoodsaverProfile? ActingFoodsaver, [property: JsonPropertyName("affected_foodsaver")] FoodsaverProfile? AffectedFoodsaver); #endregion #region Record Pickup /// /// Represents a pickup date and the occupied slots for that date. /// /// The pickup date string. /// The slots already assigned for the date. public record Pickup(string Date, List OccupiedSlots); #endregion #region Record Profile /// /// Minimal profile information for a store member. /// /// The Foodsharing profile identifier. /// The profile display name. public record Profile(int Id, string Name); #endregion #region Record Slot /// /// Describes a booked slot and the profile occupying it. /// /// Indicates whether the slot is confirmed. /// The profile assigned to the slot. public record Slot(bool IsConfirmed, Profile Profile); #endregion #region Enum TeamActiveStatus /// /// Indicates whether a team member is active or only available as a jumper. /// public enum TeamActiveStatus { Jumper = 2, Active = 1 } #endregion #region Enum VerifiedStatus /// /// Specifies whether a member has completed verification. /// public enum VerifiedStatus { Unverified = 0, Verified = 1 } #endregion } }