ajouter l'attribut type dans Category

This commit is contained in:
Arimihanta 2021-11-15 12:17:39 +01:00
parent 13d04234d1
commit bf8f6997e3

View file

@ -5,10 +5,7 @@ import java.util.Date;
import java.util.TreeSet; import java.util.TreeSet;
import java.util.SortedSet; import java.util.SortedSet;
import javax.persistence.Column; import javax.persistence.*;
import javax.persistence.Entity;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.validation.constraints.Size; import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlTransient; import javax.xml.bind.annotation.XmlTransient;
@ -53,6 +50,10 @@ public class Category extends AbstractEntity implements Serializable {
@Column(name = "last_comment_date") @Column(name = "last_comment_date")
private Date lastCommentDate; private Date lastCommentDate;
@Enumerated(EnumType.STRING)
@Column(name = "type")
private Debate.Type type= Debate.Type.BASIC ;
/** /**
* *
* @return * @return
@ -150,6 +151,22 @@ public class Category extends AbstractEntity implements Serializable {
this.documentsCount = documentsCount; this.documentsCount = documentsCount;
} }
/**
*
* @return
*/
public Debate.Type getType() {
return type;
}
/**
*
* @param type
*/
public void setType(Debate.Type type) {
this.type = type;
}
/** /**
* *
* @return * @return