FEAT : Mise en place de l'architecture + instription d'un utilisateur
This commit is contained in:
32
src/main/java/local/epul4a/fotosharing/model/Photo.java
Normal file
32
src/main/java/local/epul4a/fotosharing/model/Photo.java
Normal file
@@ -0,0 +1,32 @@
|
||||
package local.epul4a.fotosharing.model;
|
||||
|
||||
import jakarta.persistence.*;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
@Entity
|
||||
@Getter
|
||||
@Setter
|
||||
public class Photo {
|
||||
public enum Visibilite { PRIVATE, PUBLIC, SHARED }
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
|
||||
private String nomFichierOriginal;
|
||||
private String uuidFichier;
|
||||
private LocalDateTime dateUpload;
|
||||
|
||||
@Enumerated(EnumType.STRING)
|
||||
private Visibilite visibilite;
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "id_utilisateur")
|
||||
private Utilisateur proprietaire;
|
||||
|
||||
// getters & setters
|
||||
}
|
||||
Reference in New Issue
Block a user