package com.bytesw.bytebot.model;

import lombok.*;
import org.hibernate.envers.Audited;

import javax.persistence.*;
import java.io.Serializable;

@Entity
@Table(name = "AVB_PASSENGER")
@NamedQuery(name = "Passenger.findByPK", query = "Select u from Passenger u where u.id = ?1")
@Getter @Setter
@EqualsAndHashCode
@ToString(exclude = "id")
public class Passenger implements Serializable {
    @Id
    @Column(name = "passen_id")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

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

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

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

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

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

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

    @Column(name = "passen_other_details", nullable = false)
    private String otherDetails;
}
