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.*;
import java.io.Serializable;
import java.util.List;

@Audited
@Entity
@Table(name = "AVB_CALENDAR")
@NamedQuery(name = "Calendar.findByPK", query = "Select u from Calendar u where u.id = ?1")
@Getter
@Setter
@EqualsAndHashCode
@ToString(exclude = "id")
public class Calendar implements Serializable {

    @Id
    @Column(name = "cale_id")
    private String id;

    @Version
    @Column(name = "cale_version")
    @Basic(optional = false)
    private long version;

    @Column(name = "cale_name", nullable = false)
    private String name;

//    @OneToMany(mappedBy = "calendar")
//    private List<WeekScheduler> weekSchedulerList;

}
