Status associated with leaffile
This commit is contained in:
+2
-1
@@ -71,6 +71,7 @@
|
|||||||
<Compile Include="DAL\DataService.cs" />
|
<Compile Include="DAL\DataService.cs" />
|
||||||
<Compile Include="DAL\LeafWebContext.cs" />
|
<Compile Include="DAL\LeafWebContext.cs" />
|
||||||
<Compile Include="DAL\LeafWebInitializer.cs" />
|
<Compile Include="DAL\LeafWebInitializer.cs" />
|
||||||
|
<Compile Include="Entities\LeafInputStatusType.cs" />
|
||||||
<Compile Include="Entities\LeafOutputFile.cs" />
|
<Compile Include="Entities\LeafOutputFile.cs" />
|
||||||
<Compile Include="Entities\PhotosynthesisType.cs" />
|
<Compile Include="Entities\PhotosynthesisType.cs" />
|
||||||
<Compile Include="Remote\IPiscalClient.cs" />
|
<Compile Include="Remote\IPiscalClient.cs" />
|
||||||
@@ -84,7 +85,7 @@
|
|||||||
<Compile Include="Entities\LeafInputFile.cs" />
|
<Compile Include="Entities\LeafInputFile.cs" />
|
||||||
<Compile Include="Entities\LeafInputDataPhotosynthetic.cs" />
|
<Compile Include="Entities\LeafInputDataPhotosynthetic.cs" />
|
||||||
<Compile Include="Entities\LeafInputDataSite.cs" />
|
<Compile Include="Entities\LeafInputDataSite.cs" />
|
||||||
<Compile Include="Entities\LeafInputStatus.cs" />
|
<Compile Include="Entities\LeafInputFileStatus.cs" />
|
||||||
<Compile Include="Parsers\FluxnetSiteCsvParser.cs" />
|
<Compile Include="Parsers\FluxnetSiteCsvParser.cs" />
|
||||||
<Compile Include="Remote\PiscalClientException.cs" />
|
<Compile Include="Remote\PiscalClientException.cs" />
|
||||||
<Compile Include="Remote\PiscalLeafInputFile.cs" />
|
<Compile Include="Remote\PiscalLeafInputFile.cs" />
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ namespace LeafWeb.Core.DAL
|
|||||||
|
|
||||||
public void AddLeafInput(LeafInput leafInput)
|
public void AddLeafInput(LeafInput leafInput)
|
||||||
{
|
{
|
||||||
leafInput.Created = DateTime.Now;
|
leafInput.Added = DateTime.Now;
|
||||||
|
|
||||||
_db.LeafInputs.Add(leafInput);
|
_db.LeafInputs.Add(leafInput);
|
||||||
_db.SaveChanges();
|
_db.SaveChanges();
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ namespace LeafWeb.Core.DAL
|
|||||||
{
|
{
|
||||||
public DbSet<LeafInput> LeafInputs { get; set; }
|
public DbSet<LeafInput> LeafInputs { get; set; }
|
||||||
public DbSet<LeafInputFile> LeafInputFiles { get; set; }
|
public DbSet<LeafInputFile> LeafInputFiles { get; set; }
|
||||||
public DbSet<LeafInputStatus> LeafInputStatus { get; set; }
|
public DbSet<LeafInputFileStatus> LeafInputStatus { get; set; }
|
||||||
public DbSet<FluxnetSite> FluxnetSites { get; set; }
|
public DbSet<FluxnetSite> FluxnetSites { get; set; }
|
||||||
public DbSet<PhotosynthesisType> PhotosynthesisTypes { get; set; }
|
public DbSet<PhotosynthesisType> PhotosynthesisTypes { get; set; }
|
||||||
public DbSet<LeafOutputFile> LeafOutputFiles { get; set; }
|
public DbSet<LeafOutputFile> LeafOutputFiles { get; set; }
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using LeafWeb.Core.Utility;
|
|
||||||
|
|
||||||
namespace LeafWeb.Core.Entities
|
namespace LeafWeb.Core.Entities
|
||||||
{
|
{
|
||||||
@@ -10,7 +9,6 @@ namespace LeafWeb.Core.Entities
|
|||||||
public int Id { get; set; }
|
public int Id { get; set; }
|
||||||
|
|
||||||
public virtual ICollection<LeafInputFile> LeafInputFiles { get; set; }
|
public virtual ICollection<LeafInputFile> LeafInputFiles { get; set; }
|
||||||
public virtual ICollection<LeafInputStatus> LeafInputStatuses { get; set; }
|
|
||||||
|
|
||||||
[Required(ErrorMessage = "Name required")]
|
[Required(ErrorMessage = "Name required")]
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
@@ -29,9 +27,6 @@ namespace LeafWeb.Core.Entities
|
|||||||
|
|
||||||
[DataType(DataType.Date)]
|
[DataType(DataType.Date)]
|
||||||
[Required]
|
[Required]
|
||||||
public DateTime Created { get; set; }
|
public DateTime Added { get; set; }
|
||||||
|
|
||||||
[DataType(DataType.Date)]
|
|
||||||
public DateTime? Processed { get; set; }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,6 @@
|
|||||||
namespace LeafWeb.Core.Entities
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace LeafWeb.Core.Entities
|
||||||
{
|
{
|
||||||
public class LeafInputFile
|
public class LeafInputFile
|
||||||
{
|
{
|
||||||
@@ -14,5 +16,8 @@
|
|||||||
public string Filename { get; set; }
|
public string Filename { get; set; }
|
||||||
|
|
||||||
public byte[] Contents { 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>
|
/// <summary>
|
||||||
/// Status of processing LeafInput
|
/// Status of processing LeafInput
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class LeafInputStatus
|
public class LeafInputFileStatus
|
||||||
{
|
{
|
||||||
public int Id { get; set; }
|
public int Id { get; set; }
|
||||||
public virtual LeafInput LeafInput { get; set; }
|
public virtual LeafInputFile LeafInputFile { get; set; }
|
||||||
public string Status { get; set; }
|
public LeafInputStatusType Status { get; set; }
|
||||||
public string Description { get; set; }
|
public string Description { get; set; }
|
||||||
public DateTime DateTime { get; set; }
|
public DateTime DateTime { get; set; }
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
namespace LeafWeb.Core.Entities
|
||||||
|
{
|
||||||
|
public enum LeafInputStatusType
|
||||||
|
{
|
||||||
|
Added,
|
||||||
|
ProcessStarted,
|
||||||
|
ProcessCompleted,
|
||||||
|
ProcessError
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user