package es.uv.garcosda.shared.domain;

import java.io.Serializable;
import java.util.Date;

public class Mail implements Serializable {

	private static final long serialVersionUID = 1L;
	
	private String id;
	private String from;
	private String to;
	private String subject;
	private String body;
	private Date date;
	
	public Mail() {}
	
	public Mail(String id, String from, String to, String subject, String body, Date date) {
		this.id = id;
		this.from = from;
		this.to = to;
		this.subject = subject;
		this.body = body;
		this.date = date;
	}
	
	public Mail(String from, String to, String subject, String body, Date date) {
		this.from = from;
		this.to = to;
		this.subject = subject;
		this.body = body;
		this.date = date;
	}
	
	public Mail(String from, String to, String subject, String body) {
		this.from = from;
		this.to = to;
		this.subject = subject;
		this.body = body;
	}
	
	public String getId() {
		return id;
	}

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

	public String getFrom() {
		return from;
	}

	public void setFrom(String from) {
		this.from = from;
	}

	public String getTo() {
		return to;
	}

	public void setTo(String to) {
		this.to = to;
	}

	public String getSubject() {
		return subject;
	}

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

	public String getBody() {
		return body;
	}

	public void setBody(String body) {
		this.body = body;
	}
	
	public Date getDate() {
		return date;
	}

	public void setDate(Date date) {
		this.date = date;
	}
	
	@Override
	public String toString() {
		return String.format("Email{from=%s, to=%s, subject=%s}", this.getFrom(), this.getTo(), this.getSubject());
	}
	
}
