rama creada apartir de master en j
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
namespace adas_core.Domain.Models;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a note entity used to store textual or descriptive information.
|
||||
/// </summary>
|
||||
public class Note
|
||||
{
|
||||
public string? CommentType { get; set; } = string.Empty;
|
||||
@@ -8,15 +11,19 @@ public class Note
|
||||
|
||||
public DateTime? EnteredTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns a string representation of the note, conditionally including the comment type, comment text, and entered time when their values are present.
|
||||
/// </summary>
|
||||
/// <returns>A formatted string in the form "note[...]" containing the available note properties, or "note[]" when no properties are set.</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
List<string> 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) + "]";
|
||||
}
|
||||
{
|
||||
List<string> 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) + "]";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user