using System; using System.Collections.Generic; using EstusShots.Shared.Dto; using EstusShots.Shared.Interfaces; namespace EstusShots.Shared.Models.Parameters { // GetSeasons /// /// Parameter class for loading a list of all seasons from the database /// public class GetSeasonsParameter : IApiParameter { } /// /// Parameter class returned from the API with all loaded seasons /// public class GetSeasonsResponse : IApiResponse { /// /// All existing seasons in the database /// public List Seasons { get; set; } public GetSeasonsResponse(List seasons) { Seasons = seasons; } public GetSeasonsResponse() { Seasons = new List(); } } // GetSeason /// /// Parameter class for loading a single season object /// public class GetSeasonParameter : IApiParameter { /// /// ID of the season that should be loaded /// public Guid SeasonId { get; set; } public GetSeasonParameter() { SeasonId = Guid.Empty; } public GetSeasonParameter(Guid seasonId) { SeasonId = seasonId; } } /// /// Parameter class returned from the API after loading a single season object /// public class GetSeasonResponse : IApiResponse { /// /// The loaded season /// public Season Season { get; set; } public GetSeasonResponse() { Season = new Season(); } public GetSeasonResponse(Season season) { Season = season; } } // SaveSeason /// /// Parameter class for saving season objects /// public class SaveSeasonParameter : IApiParameter { /// /// The season object that should be saved /// public Season Season { get; set; } public SaveSeasonParameter() { Season = new Season(); } public SaveSeasonParameter(Season season) { Season = season; } } /// /// Parameter class returned from the API after saving a season object /// public class SaveSeasonResponse : IApiResponse { /// /// ID of the season that was updated or created /// public Guid SeasonId { get; set; } public SaveSeasonResponse() { SeasonId = Guid.Empty; } public SaveSeasonResponse(Guid seasonId) { SeasonId = seasonId; } } }