42 lines
1.9 KiB
C#
42 lines
1.9 KiB
C#
using adas_core.Domain.Enums;
|
|
using adas_core.Domain.Models.DTO.Display;
|
|
using MongoDB.Bson;
|
|
|
|
namespace adas_core.Domain.Models.Responses;
|
|
|
|
/// <summary>
|
|
/// Represents a minimal response containing essential display configuration data.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// This class is typically used to convey a lightweight subset of display configuration information in API responses or inter-component communication.
|
|
/// </remarks>
|
|
public class DisplayConfigMinimalResponse
|
|
{
|
|
/// <summary>
|
|
/// Initializes a new instance of the <see cref="DisplayConfigMinimalResponse"/> class, which represents a minimal response payload carrying display configuration data.
|
|
/// </summary>
|
|
/// <!-- aidoc:v1 sig=722895f body=4448e1d -->
|
|
public DisplayConfigMinimalResponse()
|
|
{
|
|
}
|
|
|
|
/// <summary>
|
|
/// Initializes a new <see cref="DisplayConfigMinimalResponse"/>, a minimal response view of a display configuration, from the supplied <paramref name="displayConfig"/> and optional <paramref name="isInUse"/> flag.
|
|
/// </summary>
|
|
/// <param name="displayConfig">The source <see cref="DisplayConfigSummary"/> whose <see cref="DisplayConfigSummary.Id"/>, <see cref="DisplayConfigSummary.Type"/>, and <see cref="DisplayConfigSummary.Name"/> populate the response.</param>
|
|
/// <param name="isInUse">The nullable boolean indicating whether the display configuration is in use, stored in <see cref="DisplayConfigMinimalResponse.IsInUse"/>.</param>
|
|
/// <!-- aidoc:v1 sig=017b17e body=422f274 -->
|
|
public DisplayConfigMinimalResponse(DisplayConfigSummary displayConfig, bool? isInUse = false)
|
|
{
|
|
Id = displayConfig.Id;
|
|
Type = displayConfig.Type;
|
|
Hospital = displayConfig.Name;
|
|
IsInUse = isInUse;
|
|
}
|
|
|
|
public ObjectId Id { get; set; }
|
|
public DisplayConfigEnums.DisplayType Type { get; set; } = DisplayConfigEnums.DisplayType.Unknown;
|
|
public string? Hospital { get; set; }
|
|
|
|
public bool? IsInUse { get; set; }
|
|
} |