added comments in entities

This commit is contained in:
Bartha Maxime 2024-04-10 01:14:34 +02:00
parent 40186f9898
commit 783cd8fa9f
5 changed files with 41 additions and 10 deletions

View File

@ -1,7 +1,15 @@
package ovh.herisson.Clyde.Tables.ScientificPublications;
/******************************************************
* @file Access.java
* @author Maxime Bartha
* @scope Extension Publications scientifiques
*
* Access Type for the Articles
*
******************************************************/
public enum Access {
OpenSource,
Restricted,
Private,
OpenSource, // everyone can see
Restricted, // only Researchers and Staff Members (secretary, teachers and Inscription Service)
Private, // only authors and co-authors
}

View File

@ -1,5 +1,13 @@
package ovh.herisson.Clyde.Tables.ScientificPublications;
/******************************************************
* @file Article.java
* @author Maxime Bartha
* @scope Extension Publications scientifiques
*
* Article entity
*
******************************************************/
import jakarta.persistence.*;
import lombok.AllArgsConstructor;
import lombok.Getter;
@ -24,15 +32,14 @@ public class Article {
@ManyToOne(fetch = FetchType.EAGER)
@OnDelete(action = OnDeleteAction.CASCADE)
@JoinColumn(name ="Users")
private User author;
@JoinColumn(name ="Researcher")
private Researcher author;
//todo change user to Researcher
@CreationTimestamp
@Column(nullable = false)
private Date releaseDate;
private PublishType publishType;
private PaperType paperType;
private String pdfLocation;

View File

@ -1,5 +1,13 @@
package ovh.herisson.Clyde.Tables.ScientificPublications;
/******************************************************
* @file ArticleCoAuthors
* @author Maxime Bartha
* @scope Extension Publications scientifiques
*
* Co-Authors List entity (will be accessed by Articles)
*
******************************************************/
import jakarta.persistence.FetchType;
import jakarta.persistence.JoinColumn;
import jakarta.persistence.ManyToOne;

View File

@ -1,14 +1,14 @@
package ovh.herisson.Clyde.Tables.ScientificPublications;
/******************************************************
* @file Access.java
* @file PaperType.java
* @author Maxime Bartha
* @scope Extension Publications scientifiques
*
* Type of the
* Type of the scientific paper
*
******************************************************/
public enum PublishType {
public enum PaperType {
article,
slides,
}

View File

@ -1,5 +1,13 @@
package ovh.herisson.Clyde.Tables.ScientificPublications;
/******************************************************
* @file Researcher.java
* @author Maxime Bartha
* @scope Extension Publications scientifiques
*
* Researcher entity
*
******************************************************/
import jakarta.persistence.*;
import lombok.AllArgsConstructor;
import lombok.Getter;