package com.bytesw.bytebot.bean;

import com.bytesw.bytebot.model.Reservation;
import com.google.gson.annotations.Expose;
import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
public class ReservationBean {
    @Expose
    private Long id;

    @Expose
    private Long proxyId;

    @Expose
    private String proxyName;

    @Expose
    private Long passengerId;

    @Expose
    private String passengerName;

    @Expose
    private String travelTypeClass;

    @Expose
    private Integer numberInParty;


    public static ReservationBean miniClone(Reservation reservation) {
        ReservationBean bean = new ReservationBean();

        bean.setId(reservation.getId());
        bean.setTravelTypeClass(reservation.getTravelTypeClass());
        bean.setNumberInParty(reservation.getNumberInParty());
        bean.setProxyName(reservation.getProxy().getName());
        bean.setPassengerName(reservation.getPassenger().getFirstName() + ' ' + reservation.getPassenger().getLastName());

        return bean;
    }
}
