rama creada apartir de master en j
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
namespace adas_core.Domain.Models.Recording;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a grant of access, typically used to convey permissions or authorization rights within a system.
|
||||
/// </summary>
|
||||
public class AccessGrant
|
||||
{
|
||||
private int _expiresIn;
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
namespace adas_core.Domain.Models.Recording;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a patient entity within the system, encapsulating patient-related data and behavior.
|
||||
/// </summary>
|
||||
public class Patient
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -3,6 +3,9 @@ using Newtonsoft.Json;
|
||||
|
||||
namespace adas_core.Domain.Models.Recording;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a data container for recording-related information.
|
||||
/// </summary>
|
||||
public class RecordingData
|
||||
{
|
||||
public Patient? Patient { get; set; }
|
||||
@@ -18,20 +21,28 @@ public class RecordingData
|
||||
public int Retry { get; set; }
|
||||
public string Status { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Generates a unique store identifier by combining the RoomId with the current timestamp formatted as yyyyMMdd-HHmmss, and assigns it to the Store property.
|
||||
/// </summary>
|
||||
/// <returns>A formatted store identifier string in the pattern "RoomId_yyyyMMdd-HHmmss".</returns>
|
||||
public string GenerateStore()
|
||||
{
|
||||
return Store = $"{RoomId}_{DateTime.Now:yyyyMMdd-HHmmss}";
|
||||
}
|
||||
{
|
||||
return Store = $"{RoomId}_{DateTime.Now:yyyyMMdd-HHmmss}";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a compact JSON representation of the current object. If JSON serialization fails for any reason, falls back to the base <see cref="object.ToString"/> implementation.
|
||||
/// </summary>
|
||||
/// <returns>A JSON string produced by <see cref="JsonConvert.SerializeObject(object, Formatting)"/> with <see cref="Formatting.None"/>, or the result of the base <see cref="object.ToString"/> when serialization throws.</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
try
|
||||
{
|
||||
return JsonConvert.SerializeObject(this, Formatting.None);
|
||||
try
|
||||
{
|
||||
return JsonConvert.SerializeObject(this, Formatting.None);
|
||||
}
|
||||
catch
|
||||
{
|
||||
return base.ToString()!;
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
return base.ToString()!;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user