Files

42 lines
1.0 KiB
C#
Executable File

using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
namespace ZB.MOM.WW.CBDDC.Sample.Console;
public class TodoList
{
/// <summary>
/// Gets or sets the document identifier.
/// </summary>
[Key]
public string Id { get; set; } = Guid.NewGuid().ToString();
/// <summary>
/// Gets or sets the list name.
/// </summary>
public string Name { get; set; } = string.Empty;
/// <summary>
/// Gets or sets the todo items in the list.
/// </summary>
public List<TodoItem> Items { get; set; } = new();
}
public class TodoItem
{
/// <summary>
/// Gets or sets the task description.
/// </summary>
public string Task { get; set; } = string.Empty;
/// <summary>
/// Gets or sets a value indicating whether the task is completed.
/// </summary>
public bool Completed { get; set; }
/// <summary>
/// Gets or sets the UTC creation timestamp.
/// </summary>
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
}