34 lines
1.1 KiB
Java
34 lines
1.1 KiB
Java
package org.kar.karideo.model;
|
|
|
|
import java.util.List;
|
|
|
|
import org.kar.archidata.annotation.SQLComment;
|
|
import org.kar.archidata.annotation.SQLIfNotExists;
|
|
import org.kar.archidata.model.Data;
|
|
import org.kar.archidata.model.GenericTable;
|
|
|
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
|
|
|
import jakarta.persistence.Column;
|
|
import jakarta.persistence.FetchType;
|
|
import jakarta.persistence.ManyToMany;
|
|
import jakarta.persistence.ManyToOne;
|
|
import jakarta.persistence.Table;
|
|
|
|
@Table(name = "season")
|
|
@SQLIfNotExists
|
|
@JsonInclude(JsonInclude.Include.NON_NULL)
|
|
public class Season extends GenericTable {
|
|
@Column(nullable = false)
|
|
@SQLComment("Name of the media (this represent the title)")
|
|
public String name;
|
|
@SQLComment("Description of the media")
|
|
public String description;
|
|
@Column(nullable = false)
|
|
@SQLComment("series parent ID")
|
|
@ManyToOne(fetch = FetchType.LAZY, targetEntity = Series.class)
|
|
public Long parentId;
|
|
@SQLComment("List of Id of the sopecific covers")
|
|
@ManyToMany(fetch = FetchType.LAZY, targetEntity = Data.class)
|
|
public List<Long> covers = null;
|
|
} |