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 = "BYDELER")
@NoArgsConstructor //Hibernate-krav
@AllArgsConstructor //Builder-krav
@Builder
public class Bydel implements java.io.Serializable {

    @Getter
    @Setter
    @EmbeddedId
    private BydelId id;

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

    @Getter
    @Setter
    @Column(name = "ssammenlignbar", nullable = false)
    private boolean sisteSammenlignbar;

    @Getter
    @Setter
    @Column(name = "nssammenlignbar", nullable = false)
    private boolean nestSisteSammenlignbar;
}
