package model;

import java.net.InetAddress;
import java.util.Date;
import java.text.DateFormat;
import java.text.SimpleDateFormat;

public abstract class Message {
	
	/*** ATTRIBUTS ***/
	private String date;
	private User autor;
	/**
	 *  Constructor of Message
	 * @parametres
	 * 		@param authorIP : InetAddress
	 * @description
	 * <p>
	 * 		
	 * </p>
	 */
	public Message(User autor) {
		this.autor = autor;
		DateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
		this.date = dateFormat.format(new Date());
	}
	/*** GETTERS ***/
	public String getDate() {
		return date;
	}
	public User getAutor() {
		return autor;
	}
	
	/*** SETTERS ***/
	public void setAutorIP(User autor) {
		this.autor = autor;
	}
	
	
	public abstract Object getMessage(); 
}
