using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using EVCB_OCPP.Packet.Messages.SubTypes;

namespace EVCB_OCPP.WEBAPI.Models.WebAPI
{
    public class StartTransactionRequest
    {
        public int? ConnectorId { set; get; }

        [Required]
        public string IdTag { set; get; }

        public ChargingProfilesBase ChargingProfile { set; get ;}


    }

    public class ChargingProfilesBase
    {            

        [Required]
        public int chargingProfileId { get; set; }

      
        [Required]
        public int stackLevel { get; set; }     
       
       
        [Required]
        public ChargingProfileKindType chargingProfileKind { get; set; }
      
      
        public RecurrencyKindType? recurrencyKind { get; set; }
      
        public DateTime? validFrom { get; set; }
      
        public DateTime? validTo { get; set; }

        [Required]
        public ChargingScheduleBase chargingSchedule { get; set; }
    }

    public class ChargingScheduleBase
    {       

        public int? duration { get; set; }
     
        public DateTime? startSchedule { get; set; }

        [Required]
        public ChargingRateUnitType chargingRateUnit { get; set; }

        [Required]
        public List<ChargingSchedulePeriod> chargingSchedulePeriod { get; set; }

        public decimal? minChargingRate { get; set; }
    }
}