Working HTTP tunnel
This commit is contained in:
@ -0,0 +1,41 @@
|
||||
package dev.thinhha.tunnel_client.entity;
|
||||
|
||||
import jakarta.persistence.*;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
@Entity
|
||||
@Table(name = "route_config")
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class RouteConfig {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.UUID)
|
||||
private UUID id;
|
||||
|
||||
@Column(name = "path_pattern", nullable = false, unique = true)
|
||||
private String pathPattern;
|
||||
|
||||
@Column(name = "target_url", nullable = false)
|
||||
private String targetUrl;
|
||||
|
||||
@Column(name = "priority", nullable = false)
|
||||
private Integer priority = 0;
|
||||
|
||||
@Column(name = "enabled", nullable = false)
|
||||
private Boolean enabled = true;
|
||||
|
||||
@Column(name = "description")
|
||||
private String description;
|
||||
|
||||
public RouteConfig(String pathPattern, String targetUrl, Integer priority) {
|
||||
this.pathPattern = pathPattern;
|
||||
this.targetUrl = targetUrl;
|
||||
this.priority = priority;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user