Wonky.Client/Wonky.Entity/DTO/TaskItemDto.cs
2023-03-19 10:06:03 +01:00

87 lines
No EOL
2.5 KiB
C#

// Copyright (C) 2022 FCS Frede's Computer Services.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html]
//
using System.ComponentModel.DataAnnotations;
namespace Wonky.Entity.DTO;
public class TaskItemDto
{
/// <summary>
/// Task item entity id
/// </summary>
[MaxLength(36)]
public string TaskItemId { get; set; } = "";
/// <summary>
/// User entity id
/// </summary>
[MaxLength(36)]
public string ErpUserId { get; set; } = "";
/// <summary>
/// Reference entity id
/// </summary>
[Required(ErrorMessage = "Reference id skal angives")]
public string ReferenceId { get; set; } = "";
/// <summary>
/// Task name
/// </summary>
[Required(ErrorMessage = "Opgaven skal have et navn.")]
[MaxLength(128, ErrorMessage = "Der kan bruges 128 tegn.")]
public string Name { get; set; } = "";
/// <summary>
/// Task description
/// </summary>
[MaxLength(1000, ErrorMessage = "Der kan højst bruges 1000 tegn.")]
public string Description { get; set; } = "";
/// <summary>
/// Task due date / time
/// </summary>
/// <remarks>Format "yyyy-MM-dd'T'HH:mm"</remarks>
public string DueTimestamp { get; set; } = "";
/// <summary>
/// Task type enum as string
/// </summary>
/// <value>None,Recall,Revision,Reminder</value>
public string TaskTypeEnum { get; set; } = "";
/// <summary>
/// Task interval
/// </summary>
public int Interval { get; set; }
/// <summary>
/// Flag completed
/// </summary>
public bool IsCompleted { get; set; }
/// <summary>
/// Flag overdue
/// </summary>
public bool OverDue { get; set; }
/// <summary>
/// Recurring flag
/// </summary>
/// <value>Interval != 0</value>
public bool Recurring { get; set; }
}