Status associated with leaffile

This commit is contained in:
2016-02-19 12:43:47 -05:00
parent 75fa448a0f
commit a9b6c026ad
7 changed files with 24 additions and 13 deletions
+1 -6
View File
@@ -1,7 +1,6 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using LeafWeb.Core.Utility;
namespace LeafWeb.Core.Entities
{
@@ -10,7 +9,6 @@ namespace LeafWeb.Core.Entities
public int Id { get; set; }
public virtual ICollection<LeafInputFile> LeafInputFiles { get; set; }
public virtual ICollection<LeafInputStatus> LeafInputStatuses { get; set; }
[Required(ErrorMessage = "Name required")]
public string Name { get; set; }
@@ -29,9 +27,6 @@ namespace LeafWeb.Core.Entities
[DataType(DataType.Date)]
[Required]
public DateTime Created { get; set; }
[DataType(DataType.Date)]
public DateTime? Processed { get; set; }
public DateTime Added { get; set; }
}
}
+6 -1
View File
@@ -1,4 +1,6 @@
namespace LeafWeb.Core.Entities
using System.Collections.Generic;
namespace LeafWeb.Core.Entities
{
public class LeafInputFile
{
@@ -14,5 +16,8 @@
public string Filename { get; set; }
public byte[] Contents { get; set; }
public LeafInputStatusType CurrentStatus { get; set; }
public virtual ICollection<LeafInputFileStatus> LeafInputStatuses { get; set; }
}
}
@@ -5,11 +5,11 @@ namespace LeafWeb.Core.Entities
/// <summary>
/// Status of processing LeafInput
/// </summary>
public class LeafInputStatus
public class LeafInputFileStatus
{
public int Id { get; set; }
public virtual LeafInput LeafInput { get; set; }
public string Status { get; set; }
public virtual LeafInputFile LeafInputFile { get; set; }
public LeafInputStatusType Status { get; set; }
public string Description { get; set; }
public DateTime DateTime { get; set; }
}
+10
View File
@@ -0,0 +1,10 @@
namespace LeafWeb.Core.Entities
{
public enum LeafInputStatusType
{
Added,
ProcessStarted,
ProcessCompleted,
ProcessError
}
}