using AutoMapper;
using Txgy.RBS.DbModel;
using Txgy.RBS.DbModel.Models;
using Txgy.RBS.DTO;
using Txgy.RBS.DTO.Reception;
using Txgy.RBS.Framework;

namespace Txgy.RBS.IServices
{
    public class AutoMapObject : Profile
    {
        public AutoMapObject()
        {
            CreateMap<result, ResultDTO>().ReverseMap();
            CreateMap<project_info, ProjectInfoDTO>()
                .ForMember(p => p.timeTab, pd => pd.MapFrom(s => s.time_tab))
                .ForMember(p => p.stationFile, pd => pd.MapFrom(s => s.station_file)).ReverseMap();
            CreateMap<project_used,ProjectUsedDTO>().ReverseMap();
            CreateMap<station, StationDTO>().ReverseMap();
            CreateMap<station_file, StationFileDTO>().ReverseMap();
            CreateMap<station_num_vpn,StationNumVpnDTO>().ReverseMap();
            CreateMap<time_tab, TimeTabDTO>().ReverseMap();
            CreateMap<global_config,GlobalConfigDTO>().ReverseMap();
            CreateMap<redis_server, RedisInfoDTO>().ReverseMap();
        }
    }
}
