FarmMapsApiClient_KB34_MAST/FarmmapsApi/Models/ItemTaskStatus.cs

24 lines
599 B
C#
Raw Permalink Normal View History

2020-03-24 08:47:08 +00:00
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;
2020-03-24 08:47:08 +00:00
public DateTime? Started { get; set; }
public DateTime? Finished { get; set; }
public bool IsFinished => State == ItemTaskState.Error || State == ItemTaskState.Ok;
2020-03-24 08:47:08 +00:00
}
}