package classes;

import java.io.Serializable;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class Frequentation implements Serializable{
	
	private static SimpleDateFormat sdf= new SimpleDateFormat("dd/MM/yyyy"); // 26/12/2019-14:00:00
	private String idPersonne;
	private String idEspace;
	private Date date;
	
	public Frequentation(String idPersonne, String idEspace, String date) throws ParseException{
		super();
		this.idPersonne = idPersonne;
		this.idEspace = idEspace;
		this.date = sdf.parse(date);
	}
	
	@Override
	public String toString() {
		return "{\"date\":\"" + date +"\",\"idPersonne\":" + idPersonne + ",\"idEspace\":" + idEspace+"}";
	}

	public String getIdPersonne() {
		return idPersonne;
	}

	public String getIdEspace() {
		return idEspace;
	}

	public Date getDate() {
		return date;
	}
}
