| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- package nju.seec.SEECdemo.data.entity.assignment;
- import lombok.Data;
- import lombok.EqualsAndHashCode;
- import lombok.ToString;
- import nju.seec.SEECdemo.data.convertor.ScoreDetailSetConverter;
- import javax.persistence.*;
- import java.util.HashSet;
- import java.util.Set;
- @Data
- @EqualsAndHashCode(exclude = {"code"})
- @ToString(exclude = {"code"})
- @Entity
- @Table(name = "ENTITY_CODE_RESULT")
- public class CodeResult {
- @Id
- @Column(name = "id")
- private Integer id;
- @ManyToOne(targetEntity = Code.class, fetch = FetchType.LAZY)
- @JoinColumn(name = "code", referencedColumnName = "id")
- private Code code;
- @Basic
- @Column(name = "groupId")
- private Integer groupId;
- @Basic
- @Column(name = "buildJob")
- private String buildJob;
- @Basic
- @Column(name = "deployNS")
- private String deployNamespace;
- @Basic
- @Column(name = "testJob")
- private String testJob;
- @Basic
- @Column(name = "score", columnDefinition = "INT(11) NOT NULL DEFAULT 0")
- private Integer score = 0;
- @Basic
- @Column(name = "details", columnDefinition = "JSON NOT NULL")
- @Convert(converter = ScoreDetailSetConverter.class)
- private Set<Score> detailSet = new HashSet<>();
- @Data
- public static class Score {
- private Integer id;
- private String name;
- private Integer score;
- private Set<Score> detail = new HashSet<>();
- }
- }
|