package org.mynonglam.entitys;

import java.io.Serializable;
import javax.persistence.*;


/**
 * The persistent class for the messagesend database table.
 * 
 */
@Entity
public class MessageSend implements Serializable {
	private static final long serialVersionUID = 1L;

	@EmbeddedId
	private MessageSendPK id;

	private String content;

	private String datesend;

	private byte isviewed;

	//bi-directional many-to-one association to MessageType
	@ManyToOne
	@JoinColumn(name="idmsg")
	private MessageType messagetype;

	//bi-directional many-to-one association to Account
	@ManyToOne
	@JoinColumn(name="emailsend", nullable = false, insertable = false, updatable = false)
	private Account account1;

	//bi-directional many-to-one association to Account
	@ManyToOne
	@JoinColumn(name="emailto", nullable = false, insertable = false, updatable = false)
	private Account account2;

	public MessageSend() {
	}

	public MessageSendPK getId() {
		return this.id;
	}

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

	public String getContent() {
		return this.content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public String getDatesend() {
		return this.datesend;
	}

	public void setDatesend(String datesend) {
		this.datesend = datesend;
	}

	public byte getIsviewed() {
		return this.isviewed;
	}

	public void setIsviewed(byte isviewed) {
		this.isviewed = isviewed;
	}

	public MessageType getMessagetype() {
		return this.messagetype;
	}

	public void setMessagetype(MessageType messagetype) {
		this.messagetype = messagetype;
	}

	public Account getAccount1() {
		return this.account1;
	}

	public void setAccount1(Account account1) {
		this.account1 = account1;
	}

	public Account getAccount2() {
		return this.account2;
	}

	public void setAccount2(Account account2) {
		this.account2 = account2;
	}

}