using AutoMapper;
using survey_beta.DTOs.Create;
using survey_beta.DTOs.Default;
using survey_beta.DTOs.Response;
using survey_beta.DTOs.Update;
using survey_beta.Models;

public class MappingProfile : Profile
{
    public MappingProfile()
    {
        CreateMap<CreateSurveyDto, Survey>().ForMember(dest => dest.Id, opt => opt.Ignore());
        CreateMap<CreateQuestionDto, Question>().ForMember(dest => dest.Id, opt => opt.Ignore());
        CreateMap<CreateChoiceDto, Choice>().ForMember(dest => dest.Id, opt => opt.Ignore());

        CreateMap<Survey, SurveyDto>();
        CreateMap<Question, QuestionDto>();
        CreateMap<Choice, ChoiceDto>();

        CreateMap<UpdateSurveyDto, Survey>();
    }
}
