namespace adas_core.Domain.Models;
///
/// Represents a note entity used to store textual or descriptive information.
///
public class Note
{
public string? CommentType { get; set; } = string.Empty;
public string Comment { get; set; } = string.Empty;
public DateTime? EnteredTime { get; set; }
///
/// Returns a string representation of the note, conditionally including the comment type, comment text, and entered time when their values are present.
///
/// A formatted string in the form "note[...]" containing the available note properties, or "note[]" when no properties are set.
public override string ToString()
{
List items = [];
if (!string.IsNullOrEmpty(CommentType)) items.Add($", commentType: {CommentType}");
if (!string.IsNullOrEmpty(Comment)) items.Add($"comment: {Comment}");
if (EnteredTime != null) items.Add($", enteredTime: {EnteredTime}");
return "note[" + string.Join(", ", items) + "]";
}
}