package no.valg.valgnatt.database.hibernate;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.Table;

@Entity
@Table(name = "partilister")
@NoArgsConstructor //Hibernate-krav
@AllArgsConstructor //Builder-krav
@Builder
public class Partiliste implements java.io.Serializable {

    @Getter
    @Setter
    @EmbeddedId
    private PartilisteId id;

    @Getter
    @Setter
    @Column(name = "partikategori", nullable = false)
    private Integer partikategori;

    @Getter
    @Setter
    @Column(name = "visningssekvens", nullable = false)
    private Integer visningssekvens;

    @Getter
    @Setter
    @Column(name = "partinavn", nullable = false, length = 320)
    private String partinavn;
}
