build: 取消联合主键的@Id

This commit is contained in:
CaptainB 2023-05-25 14:31:15 +08:00
parent 91442ab4cc
commit f3514c0509
3 changed files with 17 additions and 28 deletions

View File

@ -1,12 +1,11 @@
package io.metersphere.load.domain;
import org.springframework.data.annotation.Id;
import org.springframework.data.relational.core.mapping.Table;
import io.metersphere.validation.groups.Updated;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;
import org.springframework.data.relational.core.mapping.Table;
import java.io.Serializable;
@ -15,17 +14,14 @@ import java.io.Serializable;
@Data
public class LoadTestReportResultPart implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@NotBlank(message = "{load_test_report_result_part.report_id.not_blank}", groups = {Updated.class})
@ApiModelProperty(name = "报告ID", required = true, allowableValues = "range[1, 50]")
private String reportId;
@Id
@NotBlank(message = "{load_test_report_result_part.report_key.not_blank}", groups = {Updated.class})
@ApiModelProperty(name = "报告项目key", required = true, allowableValues = "range[1, 64]")
private String reportKey;
@Id
@NotBlank(message = "{load_test_report_result_part.resource_index.not_blank}", groups = {Updated.class})
@ApiModelProperty(name = "资源节点索引号", required = true, dataType = "Integer")
private Integer resourceIndex;
@ -33,6 +29,4 @@ public class LoadTestReportResultPart implements Serializable {
@ApiModelProperty(name = "报告项目内容", required = false, allowableValues = "range[1, ]")
private byte[] reportValue;
}

View File

@ -1,14 +1,12 @@
package io.metersphere.load.domain;
import org.springframework.data.annotation.Id;
import org.springframework.data.relational.core.mapping.Table;
import io.metersphere.validation.groups.Created;
import io.metersphere.validation.groups.Updated;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Data;
import org.springframework.data.relational.core.mapping.Table;
import java.io.Serializable;
@ApiModel(value = "即时报告结果")
@ -16,29 +14,29 @@ import java.io.Serializable;
@Data
public class LoadTestReportResultRealtime implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@NotBlank(message = "{load_test_report_result_realtime.report_id.not_blank}", groups = {Updated.class})
@ApiModelProperty(name = "报告ID", required = true, allowableValues="range[1, 50]")
@ApiModelProperty(name = "报告ID", required = true, allowableValues = "range[1, 50]")
private String reportId;
@Id
@NotBlank(message = "{load_test_report_result_realtime.report_key.not_blank}", groups = {Updated.class})
@ApiModelProperty(name = "报告项目key", required = true, allowableValues="range[1, 64]")
@ApiModelProperty(name = "报告项目key", required = true, allowableValues = "range[1, 64]")
private String reportKey;
@Id
@NotBlank(message = "{load_test_report_result_realtime.resource_index.not_blank}", groups = {Updated.class})
@ApiModelProperty(name = "资源节点索引号", required = true, dataType = "Integer")
private Integer resourceIndex;
@Id
@NotBlank(message = "{load_test_report_result_realtime.sort.not_blank}", groups = {Updated.class})
@ApiModelProperty(name = "报告项目内容排序", required = true, dataType = "Integer")
private Integer sort;
@ApiModelProperty(name = "报告项目内容", required = false, allowableValues="range[1, ]")
@ApiModelProperty(name = "报告项目内容", required = false, allowableValues = "range[1, ]")
private byte[] reportValue;
}

View File

@ -1,7 +1,5 @@
package io.metersphere.sdk.domain;
import org.springframework.data.annotation.Id;
import org.springframework.data.relational.core.mapping.Table;
import io.metersphere.validation.groups.Created;
import io.metersphere.validation.groups.Updated;
import io.swagger.annotations.ApiModel;
@ -9,6 +7,7 @@ import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Data;
import org.springframework.data.relational.core.mapping.Table;
import java.io.Serializable;
@ -18,12 +17,10 @@ import java.io.Serializable;
public class RelationshipEdge implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@NotBlank(message = "{relationship_edge.source_id.not_blank}", groups = {Updated.class})
@ApiModelProperty(name = "源节点的ID", required = true, allowableValues = "range[1, 50]")
private String sourceId;
@Id
@NotBlank(message = "{relationship_edge.target_id.not_blank}", groups = {Updated.class})
@ApiModelProperty(name = "目标节点的ID", required = true, allowableValues = "range[1, 50]")
private String targetId;