package com.eactive.testmaster.api.dto;

import java.util.ArrayList;
import java.util.List;

public class MockRouteDTO {
    private Long id;
    private String name;
    private String method;
    private String pathPattern;
    private String requestScript;
    private List<MockResponseDTO> responses = new ArrayList<>();

    // Add constructor for entity conversion
//    public static MockRouteDTO from(MockRoute route) {
//        MockRouteDTO dto = new MockRouteDTO();
//        dto.setId(route.getId());
//        dto.setName(route.getName());
//        dto.setMethod(route.getMethod());
//        dto.setPathPattern(route.getPathPattern());
//        dto.setRequestScript(route.getRequestScript());
//        dto.setResponses(route.getResponses().stream()
//            .map(MockResponseDTO::from)
//            .collect(Collectors.toList()));
//        return dto;
//    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getMethod() {
        return method;
    }

    public void setMethod(String method) {
        this.method = method;
    }

    public String getPathPattern() {
        return pathPattern;
    }

    public void setPathPattern(String pathPattern) {
        this.pathPattern = pathPattern;
    }

    public String getRequestScript() {
        return requestScript;
    }

    public void setRequestScript(String requestScript) {
        this.requestScript = requestScript;
    }

    public List<MockResponseDTO> getResponses() {
        return responses;
    }

    public void setResponses(List<MockResponseDTO> responses) {
        this.responses = responses;
    }
}
