PAN-50 Created the DTO for theorems
This commit is contained in:
@@ -1,19 +1,33 @@
|
||||
package edu.msudenver.tsp.persistence.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.hibernate.annotations.Type;
|
||||
import org.springframework.data.jpa.domain.support.AuditingEntityListener;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.EntityListeners;
|
||||
import javax.persistence.Table;
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Size;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
public class TheoremDto extends BaseDto {
|
||||
@Entity(name = "theorems")
|
||||
@Table(name = "theorems")
|
||||
@EntityListeners(AuditingEntityListener.class)
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class TheoremDto extends BaseDto implements Serializable {
|
||||
@NotBlank @Size(min = 1, max = 512, message = "theorem name must be between 1 and 512 characters") private String name;
|
||||
@NotNull @JsonProperty("theorem_type") private TheoremType theoremType;
|
||||
@NotNull private String branch;
|
||||
@Type(type = "json") @Column(columnDefinition = "jsonb") @JsonProperty("referenced_definitions") private List<String> referencedDefinitions;
|
||||
@Type(type = "json") @Column(columnDefinition = "jsonb") @JsonProperty("referenced_theorems") private List<String> referencedTheorems;
|
||||
@NotNull @JsonProperty("proven_status") private boolean provenStatus;
|
||||
|
||||
public static final long serialVersionUID = 1545568391140364425L;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user