using System.Text.Json.Serialization;
using adas_core.Domain.Models.MongoModels;
using MongoDB.Bson;
namespace adas_core.Domain.Models.DTO;
///
/// Represents a data transfer object that encapsulates information about a unit.
///
///
public class UnitInfoDto
{
///
/// Initializes a new instance of the data transfer object, enabling JSON deserialization via the .
///
///
[JsonConstructor]
public UnitInfoDto()
{
}
///
/// Initializes a new instance of from the supplied ,
/// projecting its identifier and name into the DTO with safe empty-string defaults for the display fields.
///
/// The optional whose values populate the DTO; when null, the string properties default to .
///
public UnitInfoDto(Unit? unit)
{
Id = unit?.Id;
Name = unit?.Name ?? string.Empty;
Title = unit?.Name ?? string.Empty;
}
public ObjectId? Id { get; set; }
public string Name { get; set; } = string.Empty;
public string Title { get; set; } = string.Empty;
public string? ConfigObservationId { get; set; }
public long? Admissions { get; set; }
public long? Discharges { get; set; }
public long? Displays { get; set; }
public long? Patients { get; set; }
public long? PointOfCares { get; set; }
public long? VirtualPointOfCares { get; set; }
}