package it.enea.cruise.model.user;

import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.MapsId;
import javax.persistence.Table;

import com.fasterxml.jackson.annotation.JsonIgnore;


@Entity(name = "flowCommunity")
@Table(name = "flows_communities")
public class FlowCommunity {

	
	@EmbeddedId
	@JsonIgnore
	private FlowCommunityId id = new FlowCommunityId();

	@ManyToOne
	@JoinColumn(name = "flowid")
	@MapsId("flowid")
	private Flow flow;

	@ManyToOne
	@JoinColumn(name = "communityid")
	@MapsId("communityid")
	private Community community;

	@Column(name = "accountconsumption")
	private String accountconsumption;
}
