using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Entity = BookingModule.Entity.Journey;
using Service = ThirdPartyBookingFeature.ThirdPartyBookingServiceReference.Journey;


namespace ThirdPartyBookingFeature.Mapping
{
    public static class JourneyMap
    {
        public static Entity ServiceToEntity(Service source)
        {
            Entity result = new Entity();
            result.ArrivalStation = LocationMap.ServiceToEntity(source.ArrivalStation);
            result.ArrivalTime = source.ArrivalTime;
            result.Carrier = source.Carrier;
            result.DepartureStation = LocationMap.ServiceToEntity(source.DepartureStation);
            result.DepartureTime = source.DepartureTime;
            result.Key = source.Key;
            result.Number = source.Number;
            return result;
        }

        public static Service EntityToService(Entity source)
        {
            Service result = new Service();
            result.ArrivalStation = LocationMap.EntityToService(source.ArrivalStation);
            result.ArrivalTime = source.ArrivalTime;
            result.Carrier = source.Carrier;
            result.DepartureStation = LocationMap.EntityToService(source.DepartureStation);
            result.DepartureTime = source.DepartureTime;
            result.Key = source.Key;
            result.Number = source.Number;
            return result;
        }
    }
}
