FarmMapsApiClient/FarmmapsApi/Models/ItemTaskStatus.cs

24 lines
599 B
C#

using System;
namespace FarmmapsApi.Models
{
public enum ItemTaskState
{
Error,
Ok,
Scheduled,
Processing,
}
public class ItemTaskStatus
{
public string TaskType { get; set; }
public string Code { get; set; }
public string Message { get; set; }
public ItemTaskState State { get; set; } = ItemTaskState.Scheduled;
public DateTime? Started { get; set; }
public DateTime? Finished { get; set; }
public bool IsFinished => State == ItemTaskState.Error || State == ItemTaskState.Ok;
}
}