All checks were successful
Deploy Production Server / if_merged (pull_request) Successful in 6m50s
45 lines
1.1 KiB
Java
45 lines
1.1 KiB
Java
package fr.titionfire.ffsaf.data.model;
|
|
|
|
import fr.titionfire.ffsaf.utils.Categorie;
|
|
import io.quarkus.runtime.annotations.RegisterForReflection;
|
|
import jakarta.persistence.*;
|
|
import lombok.*;
|
|
import org.eclipse.microprofile.openapi.annotations.media.Schema;
|
|
|
|
@Getter
|
|
@Setter
|
|
@Builder
|
|
@AllArgsConstructor
|
|
@NoArgsConstructor
|
|
@RegisterForReflection
|
|
|
|
@Entity
|
|
@Table(name = "selection")
|
|
public class SelectionModel implements LoggableModel {
|
|
@Id
|
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
|
@Schema(description = "L'identifiant de la séléction.")
|
|
Long id;
|
|
|
|
@ManyToOne(fetch = FetchType.LAZY)
|
|
@JoinColumn(name = "membre", referencedColumnName = "id")
|
|
@Schema(description = "Le membre de la séléction. (optionnel)")
|
|
MembreModel membre;
|
|
|
|
@Schema(description = "La saison de la séléction.", examples = "2025")
|
|
int saison;
|
|
|
|
@Schema(description = "Catégorie de la séléction.")
|
|
Categorie categorie;
|
|
|
|
@Override
|
|
public String getObjectName() {
|
|
return "selection " + id.toString();
|
|
}
|
|
|
|
@Override
|
|
public LogModel.ObjectType getObjectType() {
|
|
return LogModel.ObjectType.Selection;
|
|
}
|
|
}
|