package sicura.entities;
// Generated 2-lug-2017 12.20.06 by Hibernate Tools 5.2.3.Final

import java.sql.Blob;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;
import javax.persistence.Version;

/**
 * Sysdiagrams generated by hbm2java
 */
@Entity
@Table(name = "sysdiagrams", schema = "dbo", uniqueConstraints = @UniqueConstraint(columnNames = {
		"principal_id", "name" }))
public class Sysdiagrams implements java.io.Serializable {

	private Integer diagramId;
	private Integer version;
	private String name;
	private int principalId;
	private Blob definition;

	public Sysdiagrams() {
	}

	public Sysdiagrams(String name, int principalId) {
		this.name = name;
		this.principalId = principalId;
	}

	public Sysdiagrams(String name, int principalId, Blob definition) {
		this.name = name;
		this.principalId = principalId;
		this.definition = definition;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)

	@Column(name = "diagram_id", unique = true, nullable = false)
	public Integer getDiagramId() {
		return this.diagramId;
	}

	public void setDiagramId(Integer diagramId) {
		this.diagramId = diagramId;
	}

	@Version
	@Column(name = "version")
	public Integer getVersion() {
		return this.version;
	}

	public void setVersion(Integer version) {
		this.version = version;
	}

	@Column(name = "name", nullable = false, length = 128)
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(name = "principal_id", nullable = false)
	public int getPrincipalId() {
		return this.principalId;
	}

	public void setPrincipalId(int principalId) {
		this.principalId = principalId;
	}

	@Column(name = "definition")
	public Blob getDefinition() {
		return this.definition;
	}

	public void setDefinition(Blob definition) {
		this.definition = definition;
	}

}
