package org.mynonglam.entitys;

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


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

	@EmbeddedId
	private RelationshipPK id;

	private byte isaccept;

	private byte isviewed;

	private String requestdate;

	private String responsedate;

	//bi-directional many-to-one association to ShareType
	@ManyToOne
	@JoinColumn(name="idshare")
	private ShareType sharetype;

	//bi-directional many-to-one association to Account
	@ManyToOne
	@JoinColumn(name="emailfrom", 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;

	//bi-directional many-to-one association to RelationshipType
	@ManyToOne
	@JoinColumn(name="idreltype")
	private RelationshipType relationshiptype;

	public Relationship() {
	}

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

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

	public byte getIsaccept() {
		return this.isaccept;
	}

	public void setIsaccept(byte isaccept) {
		this.isaccept = isaccept;
	}

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

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

	public String getRequestdate() {
		return this.requestdate;
	}

	public void setRequestdate(String requestdate) {
		this.requestdate = requestdate;
	}

	public String getResponsedate() {
		return this.responsedate;
	}

	public void setResponsedate(String responsedate) {
		this.responsedate = responsedate;
	}

	public ShareType getSharetype() {
		return this.sharetype;
	}

	public void setSharetype(ShareType sharetype) {
		this.sharetype = sharetype;
	}

	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;
	}

	public RelationshipType getRelationshiptype() {
		return this.relationshiptype;
	}

	public void setRelationshiptype(RelationshipType relationshiptype) {
		this.relationshiptype = relationshiptype;
	}

}