aw3831: fix yield with decimal
All checks were successful
FarmMaps.Develop/CarbonLib/pipeline/head This commit looks good

This commit is contained in:
2022-05-26 10:24:43 +02:00
parent 6cc39e3482
commit b0ac42a957
4 changed files with 7 additions and 9 deletions

View File

@@ -16,7 +16,6 @@ namespace CarbonService.Models
[Required]
public int PostalCode { get; set; }
public List<CropField> CropFields { get; set; }
//public List<OrgManureApplied> OrgManureApplied { get; set; }
}
public class CropField
@@ -43,10 +42,12 @@ namespace CarbonService.Models
public class OrgManureApplied
{
double? yield;
[Required]
public string Crop { get; set; }
public List<OrganicManureType> OrganicManures { get; set; }
public int? CropYield { get; set; }
public double? CropYield { get { return (int?)yield; } set { yield = value; } }
public bool CropRes { get; set; }
}
@@ -62,8 +63,6 @@ namespace CarbonService.Models
{
[Required]
public int Year { get; set; }
//[Required]
//public List<string> Crops { get; set; }
[Required]
public List<OrgManureApplied> Crops { get; set; }
}
@@ -81,7 +80,6 @@ namespace CarbonService.Models
[Required]
public string Type { get; set; }
//public string Quality { get; set; }
[JsonConverter(typeof(StringEnumConverter))]
public Quality Quality { get; set; }
}