package es.uv.garcosda.domain;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.UUID;

import org.springframework.format.annotation.DateTimeFormat;


public class Meeting {
 
	String id;
	String subject;
	@DateTimeFormat(pattern="dd/MM/yyyy hh:MM")
	LocalDateTime date;
	
	public Meeting() {}
	
	public Meeting(String subject, LocalDateTime date) {
		this.id = UUID.randomUUID().toString();
		this.subject = subject;
		this.date = date;
	}
	
	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getSubject() {
		return subject;
	}

	public void setSubject(String subject) {
		this.subject = subject;
	}

	public String getDate() {
		return date.format(DateTimeFormatter.ofPattern("dd-MM-yyyy HH:mm:ss"));
	}

	public void setDate(LocalDateTime date) {
		this.date = date;
	}
	
	
	
}
