84 lines
1.7 KiB
Java
84 lines
1.7 KiB
Java
package com.eactive.testmaster.api.entity;
|
|
|
|
import java.util.ArrayList;
|
|
import java.util.List;
|
|
import javax.persistence.CascadeType;
|
|
import javax.persistence.Entity;
|
|
import javax.persistence.FetchType;
|
|
import javax.persistence.GeneratedValue;
|
|
import javax.persistence.GenerationType;
|
|
import javax.persistence.Id;
|
|
import javax.persistence.OneToMany;
|
|
import javax.persistence.Table;
|
|
|
|
|
|
@Entity
|
|
@Table(name = "MOCK_ROUTE")
|
|
public class MockRoute {
|
|
|
|
@Id
|
|
@GeneratedValue(strategy = GenerationType.SEQUENCE)
|
|
private Long id;
|
|
|
|
private String method;
|
|
|
|
private String pathPattern;
|
|
|
|
private String name;
|
|
|
|
private String description;
|
|
|
|
|
|
@OneToMany(mappedBy = "route", cascade = CascadeType.ALL, fetch = FetchType.EAGER, orphanRemoval = true)
|
|
private List<MockResponse> responses = new ArrayList<>();
|
|
|
|
public Long getId() {
|
|
return id;
|
|
}
|
|
|
|
public void setId(Long id) {
|
|
this.id = id;
|
|
}
|
|
|
|
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 List<MockResponse> getResponses() {
|
|
return responses;
|
|
}
|
|
|
|
public void setResponses(List<MockResponse> responses) {
|
|
this.responses = responses;
|
|
}
|
|
|
|
public String getName() {
|
|
return name;
|
|
}
|
|
|
|
public void setName(String name) {
|
|
this.name = name;
|
|
}
|
|
|
|
public String getDescription() {
|
|
return description;
|
|
}
|
|
|
|
public void setDescription(String description) {
|
|
this.description = description;
|
|
}
|
|
|
|
}
|