package de.thpeetz.kontor.comics.data;

import de.thpeetz.kontor.common.data.AbstractEntity;
import jakarta.persistence.Entity;
import jakarta.persistence.JoinColumn;
import jakarta.persistence.ManyToOne;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

@Getter
@Setter
@ToString
@EqualsAndHashCode(callSuper = false)
@Entity
public class TradePaperback extends AbstractEntity {

    @NotEmpty
    private String name;

    @ManyToOne
    @JoinColumn(name = "comic_id")
    @NotNull
    private Comic comic;

    private Integer issueStart;

    private Integer issueEnd;
}
