db addition
This commit is contained in:
@@ -1,5 +1,11 @@
|
||||
package ru.ip.example.domain.entity;
|
||||
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.GeneratedValue;
|
||||
import jakarta.persistence.Id;
|
||||
import jakarta.persistence.JoinColumn;
|
||||
import jakarta.persistence.OneToMany;
|
||||
import jakarta.persistence.Table;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
@@ -7,14 +13,20 @@ import lombok.ToString;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@Entity
|
||||
@Table(name = "seazon")
|
||||
@EqualsAndHashCode(onlyExplicitlyIncluded = true)
|
||||
public class SeazonEntity {
|
||||
|
||||
@Id
|
||||
@GeneratedValue
|
||||
@EqualsAndHashCode.Include
|
||||
private Integer id;
|
||||
|
||||
private Integer number;
|
||||
|
||||
@ToString.Exclude
|
||||
@OneToMany
|
||||
@JoinColumn(name = "seazon_id", referencedColumnName = "id")
|
||||
private List<SeriesEntity> series;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user