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

namespace LeafWeb.Core.Entities
{
	/// <summary>
	/// Photosynthetic parameters of Leaf Input
	/// </summary>
	public class LeafInputDataPhotosynthetic
	{
		[ForeignKey("LeafInputData")]
		public int Id { get; set; }

		public virtual LeafInputData LeafInputData { get; set; }

		/// <summary>chloroplastic CO2 photocompensation point</summary>
		/// <remarks>must be positive</remarks>
		[ParseInfo(1, alternateTitle:"Gamma*", units: "Pa")]
		public double GammaStar { get; set; }

		/// <summary>Michaelis-Menten constant for RuBP carboxylation</summary>
		/// <remarks>must be positive</remarks>
		[ParseInfo(2, units: "Pa")]
		public double Kc { get; set; }

		/// <summary>Michaelis-Menten constant for RuBP oxygenation</summary>
		/// <remarks>must be positive</remarks>
		[ParseInfo(3, units: "Pa")]
		public double Ko { get; set; }

		/// <summary>the fraction of glycolate carbon not returned to the chloroplast</summary>
		/// <remarks>must be between 0~1 if provided</remarks>
		[ParseInfo(4)]
		public double Alpha { get; set; }

		/// <summary>dark respiration</summary>
		/// <remarks>must be positive if provided</remarks>
		[ParseInfo(5, units: "umol/m2/s")]
		public double Rd { get; set; }

		/// <summary>internal (also known as mesophyll) conductance</summary>
		[ParseInfo(6, units: "umol/m2/s/Pa")]
		public double gi { get; set; }
	}
}