Adding EF initialization
This commit is contained in:
@@ -1,7 +1,12 @@
|
||||
namespace LeafWeb.Core.Models
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace LeafWeb.Core.Models
|
||||
{
|
||||
public class FluxnetSite
|
||||
{
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.None)]
|
||||
public string FluxnetId { get; set; }
|
||||
|
||||
public string SiteName { get; set; }
|
||||
|
||||
@@ -6,10 +6,9 @@ namespace LeafWeb.Core.Models
|
||||
{
|
||||
public class LeafInput
|
||||
{
|
||||
[Key]
|
||||
public int LeafInputId { get; set; }
|
||||
public int Id { get; set; }
|
||||
|
||||
public virtual IEnumerable<LeafInputFile> LeafInputFiles { get; set; }
|
||||
public virtual ICollection<LeafInputFile> LeafInputFiles { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "Name required")]
|
||||
public string Name { get; set; }
|
||||
|
||||
@@ -8,8 +8,7 @@ namespace LeafWeb.Core.Models
|
||||
/// </summary>
|
||||
public class LeafInputData
|
||||
{
|
||||
[Key]
|
||||
public int LeafInputDataId { get; set; }
|
||||
public int Id { get; set; }
|
||||
|
||||
public virtual LeafInputInfo LeafInputInfo { get; set; }
|
||||
|
||||
|
||||
@@ -4,12 +4,14 @@ namespace LeafWeb.Core.Models
|
||||
{
|
||||
public class LeafInputFile
|
||||
{
|
||||
[Key]
|
||||
public int LeafInputFileId { get; set; }
|
||||
public int Id { get; set; }
|
||||
|
||||
public virtual LeafInput LeafInput { get; set; }
|
||||
|
||||
public virtual LeafInputInfo LeafInputInfo { get; set; }
|
||||
/// <summary>
|
||||
/// Parsed values from the LeafInput used in LeafWeb for filtering/searching
|
||||
/// </summary>
|
||||
// public virtual LeafInputInfo LeafInputInfo { get; set; }
|
||||
|
||||
public string Filename { get; set; }
|
||||
|
||||
|
||||
@@ -10,12 +10,11 @@ namespace LeafWeb.Core.Models
|
||||
/// </summary>
|
||||
public class LeafInputInfo
|
||||
{
|
||||
[Key]
|
||||
public int LeafInputInfoId { get; set; }
|
||||
public int Id { get; set; }
|
||||
|
||||
public virtual LeafInputSite Site { get; set; }
|
||||
public virtual LeafInputPhotosynthetic Photosynthetic { get; set; }
|
||||
public virtual IEnumerable<LeafInputData> Data { get; set; }
|
||||
public virtual ICollection<LeafInputData> Data { get; set; }
|
||||
|
||||
[ParseInfo(1, exampleValue: "First and last name")]
|
||||
public string InvestigatorName { get; set; }
|
||||
|
||||
@@ -9,8 +9,7 @@ namespace LeafWeb.Core.Models
|
||||
/// </summary>
|
||||
public class LeafInputPhotosynthetic
|
||||
{
|
||||
[Key]
|
||||
public int LeafInputPhotosyntheticId { get; set; }
|
||||
public int Id { get; set; }
|
||||
|
||||
public virtual LeafInputInfo LeafInputInfo { get; set; }
|
||||
|
||||
|
||||
@@ -9,8 +9,7 @@ namespace LeafWeb.Core.Models
|
||||
/// </summary>
|
||||
public class LeafInputSite
|
||||
{
|
||||
[Key]
|
||||
public int LeafInputSiteId { get; set; }
|
||||
public int Id { get; set; }
|
||||
|
||||
public virtual LeafInputInfo LeafInputInfo { get; set; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user