package fr.iutfbleau.projetIHM2021FI2.Model;

import fr.iutfbleau.projetIHM2021FI2.API.*;
import java.time.LocalDate;
import java.util.*;

/** 
 * @version 1.0
 * @author Anice TAJGALT, Gianni MANZARI, Alban DUMAS
 */
public class PrereservationModel implements Prereservation {
    private String reference;
    private LocalDate dateDebut;
    private int jours;
    private TypeChambre type;
    private Client client;

    public PrereservationModel(String reference, LocalDate dateDebut, int jours, TypeChambre t, Client client){
        Objects.requireNonNull(reference,"La référence est null.");
        Objects.requireNonNull(dateDebut,"La date est null.");
        if (jours<1) {
            throw new IllegalArgumentException("Nombres de jours négatif ou null.");
        }
        Objects.requireNonNull(t,"Le type de chambre est null.");
        Objects.requireNonNull(client,"Le client est null.");
        this.reference=reference;
        this.dateDebut=dateDebut;

        this.jours=jours;
        this.type=t;
        this.client=client;
    }

    public String getReference(){
        return this.reference;
    }

    public LocalDate getDateDebut(){
        return this.dateDebut;
    }

    public int getJours(){
        return this.jours;
    }

    public TypeChambre getTypeChambre(){
        return this.type;
    }

    public Client getClient(){
        return this.client;
    }
}
