package com.bytesw.bytebot.model;

import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.hibernate.envers.Audited;

import javax.persistence.Column;
import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
import javax.persistence.NamedQuery;

@Audited
@Entity
@DiscriminatorValue(value= UniqueWeeklyCalendarException.DISCRIMINATOR_VALUE)
@NamedQuery(name = "UniqueWeeklyCalendarException.findByPK", query = "Select u from UniqueWeeklyCalendarException u where u.id = ?1")
@Getter
@Setter
@EqualsAndHashCode
@ToString
public class UniqueWeeklyCalendarException extends CalendarException {
    public static final String DISCRIMINATOR_VALUE = "W";

    @Column(name = "CALE_EXC_MONTH", nullable = false)
    private int month;

    @Column(name = "CALE_EXC_WEEK", nullable = false)
    private int weekOfMonth;

    @Column(name = "CALE_EXC_DAYWE", nullable = false)
    private int dayOfWeek;
}
