package com.bytesw.bytebot.etl.model;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import javax.persistence.*;
import java.time.OffsetDateTime;

@Cacheable(false)
@Entity
@Getter @Setter @ToString
@Table(name="avb_event_history")
@NamedQuery(name = "EventHistory.findByPK", query = "Select p from EventHistory p where p.id = ?1")
public class EventHistory {

    @Id
    @Column(name = "evenh_id")
    @SequenceGenerator(name = "AVB_EVENT_HISTORY_GENERATOR", sequenceName = "AVB_EVENT_HISTORY_SEQ", initialValue = 1, allocationSize = 1)
    @GeneratedValue(strategy = GenerationType.SEQUENCE,generator = "AVB_EVENT_HISTORY_GENERATOR")
    private Long id;

    @Column(name = "evenh_sendid")
    private String senderId;

    @Column(name = "evenh_evid")
    private Long eventId;

    @Column(name = "evenh_date")
    private OffsetDateTime date;
}
