using System.ComponentModel.DataAnnotations;
using LeafWeb.Core.Utility;

namespace LeafWeb.Core.Entities
{
    /// <summary>
	/// A/Ci data for a variety of analyses, including photosynthesis, stomatal conductance, internal conductance, water use efficiency.
    /// </summary>
    public class LeafInputDataCurve
    {
		public int Id { get; set; }

		public virtual LeafInputData LeafInputData { get; set; }

		public int ListOrder { get; set; }

		/// <summary>the data point No.</summary>
		[ParseInfo(1, units: "no unit")]
		public double? Obs { get; set; }

		/// <summary>clock time</summary>
		[StringLength(8)]
		[ParseInfo(2, units: "hh:mm:ss")]
		public string HHMMSS { get; set; }

		/// <summary>number of seconds since file opened</summary>
		[ParseInfo(3, units: "seconds")]
		public double? FTime { get; set; }

		/// <summary>photosynthetic rate</summary>
		[ParseInfo(4, units: "umol/m2/s")]
		public double? Photo { get; set; }

		/// <summary>adjusted photosynthetic rate (leakage corrected)</summary>
		/// <remarks>required</remarks>
		[ParseInfo(5, alternateTitle: "!AdjPhoto", units: "umol/m2/s")]
		public double? AdjPhoto { get; set; }

		/// <summary>stomatal conductance</summary>
		/// <remarks>required</remarks>
		[ParseInfo(6, alternateTitle: "!StomCond", units: "mol/m2/s")]
		public double? StomCond { get; set; }

		/// <summary>intercellular CO2 concentration (umol CO2 / mol moist air)</summary>
		[ParseInfo(7, alternateTitle: "!Ci", units: "umol/mol")]
		public double? Ci { get; set; }

		/// <summary>transpiration rate</summary>
		/// <remarks>must provide</remarks>
		[ParseInfo(8, alternateTitle: "!Trmmol", units:"mmol/m2/s")]
		public double? Trmmol { get; set; }

		/// <summary>water vapor pressure deficit based on leaf temperature, must provide</summary>
		[ParseInfo(9, alternateTitle: "!VpdL", units: "KPa")]
		public double? VpdL { get; set; }

		/// <summary>leaf area</summary>
		[ParseInfo(10, units:"cm2")]
		public double? Area { get; set; }

		/// <summary>estimate of the ratio of stomatal conductances of one side of the leaf to the other</summary>
		[ParseInfo(11, units: "NA")]
		public double? StmRat { get; set; }

		/// <summary>total boundary layer conductance</summary>
		[ParseInfo(12, units: "mol/m2/s")]
		public double? BLCond { get; set; }

		/// <summary>temperature in sample cell</summary>
		[ParseInfo(13, units: "oC")]
		public double? Tair { get; set; }

		/// <summary>temperature of leaf thermocouple</summary>
		/// <remarks>required</remarks>
		[ParseInfo(14, alternateTitle: "!Tleaf", units: "oC")]
		public double? Tleaf { get; set; }

		/// <summary>IRGA Block temperature</summary>
		[ParseInfo(15, units: "oC")]
		public double? TBlk { get; set; }

		/// <summary>reference CO2 concentration</summary>
		[ParseInfo(16, units: "umol/mol")]
		public double? CO2R { get; set; }

		/// <summary>Sample CO2 concentration</summary>
		[ParseInfo(17, units: "umol/mol")]
		public double? CO2S { get; set; }

		/// <summary>reference cell water vapor concentration</summary>
		[ParseInfo(18, units: "mmol/mol")]
		public double? H2OR { get; set; }

		/// <summary>sample cell water vapor concentration</summary>
		[ParseInfo(19, units: "mmol/mol")]
		public double? H2OS { get; set; }

		/// <summary>(%) Reference cell relative humidity</summary>
		[ParseInfo(20)]
		public double? RH_R { get; set; }

		/// <summary>(%) sample cell relative humidity</summary>
		[ParseInfo(21)]
		public double? RH_S { get; set; }

		/// <summary>(umol/s) molar flow rate of air entering the leaf chamber</summary>
		[ParseInfo(22)]
		public double? Flow { get; set; }

		/// <summary> PAR measured by the in-chamber quantum sensor</summary>
		/// <remarks>required</remarks>
		[ParseInfo(23, alternateTitle: "!PARi", units: "umol/m2/s")]
		public double? PARi { get; set; }

		/// <summary>PAR measured by the external quantum sensor</summary>
		[ParseInfo(24, units: "umol/m2/s")]
		public double? PARo { get; set; }

		/// <summary>atmospheric pressure</summary>
		[ParseInfo(25, units: "KPa")]
		public double? Press { get; set; }

		/// <summary>sample CO2 offset</summary>
		[ParseInfo(26, units: "umol/mol")]
		public double? CsMch { get; set; }

		/// <summary>sample H2O offset</summary>
		[ParseInfo(27, units: "mmol/mol")]
		public double? HsMch { get; set; }

		/// <summary>a stability indicator as a decimal value</summary>
		[ParseInfo(28, units: "NA")]
		public double? StableF { get; set; }

		/// <summary>status flag</summary>
		[ParseInfo(29, units: "NA")]
		public string Status { get; set; }

		/// <summary>DeltaF/Fm, the fraction of absorbed PSII photons that are used in photochemistry</summary>
		[ParseInfo(30, units: "NA")]
		public double? PhiPS2 { get; set; }

		/// <summary>atmospheric O2 partial pressure</summary>
		[ParseInfo(31, units: "Pa")]
		public double? OxygenPress { get; set; }
    }
}
