using Lada.Framework.DTO;
using System.ComponentModel.DataAnnotations;

namespace Ladaer.BackEnd.Infrastructures.DTO.Items.Trucks
{
    public class TruckMaintenanceItem : BaseItem<int>
    {
        public int AgencyId { get; set; }
        public string AgencyName { get; set; }
        public int TruckId { get; set; }
        public string TruckLicensePlate { get; set; }
        [MaxLength(512)]
        public string Title { get; set; }
        [MaxLength(2048)]
        public string Description { get; set; }
        public string UserName { get; set; }
        public string FullName { get; set; }
        public int UserId { get; set; }
        [MaxLength(512)]
        public string GarageName { get; set; }
        [MaxLength(512)]
        public string GarageAddress { get; set; }
        [MaxLength(11)]
        public string GaragePhone { get; set; }
        public decimal Cost { get; set; }
        public bool HasInvoice { get; set; }
        [MaxLength(2048)]
        public string InvoiceUrl { get; set; }
        public DateTimeOffset StartTime { get; set; }
        public string StartTimeStr
        {
            get
            {
                return StartTime.ToString("dd/MM/yyyy HH:mm");
            }
        }
        public DateTimeOffset EndTime { get; set; }
        public string EndTimeStr
        {
            get
            {
                return EndTime.ToString("dd/MM/yyyy HH:mm");
            }
        }
        public DateTimeOffset NextTime { get; set; }
        public string NextTimeStr
        {
            get
            {
                return NextTime.ToString("dd/MM/yyyy HH:mm");
            }
        }
        public List<TruckMaintLinkItem> TruckMaintLinkItems { get; set; }
    }
}
