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;
import java.time.OffsetDateTime;

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

    @Column(name = "CALE_EXC_FROM", nullable = false)
    private OffsetDateTime from;

    @Column(name = "CALE_EXC_TO", nullable = false)
    private OffsetDateTime to;
}