using System;
using System.ComponentModel.DataAnnotations;

namespace MileageTraker.Web.Models
{
	public class FuelLog
	{
		[Key]
		public int FuelLogId { get; set; }

		[Required]
		[DataType(DataType.Date)]
		[DisplayFormatAttribute(ApplyFormatInEditMode = true, DataFormatString = "{0:d}")]
		public DateTime Date { get; set; }

		[Required]
		[StringLength(128)]
		public string DriverFullName { get; set; }

		[Required]
		[Display(Name = "Tag#")]
		public string TagNumber { get; set; }
		
		[Required]
		public int Odometer { get; set; }

		[StringLength(64)]
		public string CityName { get; set; }

		public double MPG { get; set; }

		[Required]
		public double GasPurchased { get; set; }

		[Required]
		public decimal TotalPrice { get; set; }

		// Matched log
		public virtual Log Log { get; set; }

		public string SourceFilename { get; set; }
	}
}