package es.uv.saic.domain;


import java.io.Serializable;
import jakarta.persistence.*;
import java.util.Date;

import es.uv.saic.dto.OrganDTO;

/**
 * The persistent class for the usuaris_rols database table.
 * 
 */
@Entity
@Table(name="usuaris_rols")
@NamedQuery(name="UsuarisRol.findAll", query="SELECT u FROM UsuarisRol u")
public class UsuarisRol implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@Column(name="id_usuari_rol")
	private Integer idUsuariRol;

	@Temporal(TemporalType.DATE)
	private Date fin;

	@Temporal(TemporalType.DATE)
	private Date inici;

	private Integer num;

	private Integer supervisor;

	private Boolean vigent;

	//bi-directional many-to-one association to Organ
	@ManyToOne
	@JoinColumns({
		@JoinColumn(name="lugar", referencedColumnName="lugar"),
		@JoinColumn(name="tlugar", referencedColumnName="tlugar")
		})
	private Organ organ;

	//bi-directional many-to-one association to Rol
	@ManyToOne
	@JoinColumn(name="id_rol")
	private Rol rol;

	//bi-directional many-to-one association to Usuari
	@ManyToOne
	@JoinColumn(name="usuari")
	private Usuari usuari;

	public UsuarisRol() {
	}

	public Integer getIdUsuariRol() {
		return this.idUsuariRol;
	}

	public void setIdUsuariRol(Integer idUsuariRol) {
		this.idUsuariRol = idUsuariRol;
	}

	public Date getFin() {
		return this.fin;
	}

	public void setFin(Date fin) {
		this.fin = fin;
	}

	public Date getInici() {
		return this.inici;
	}

	public void setInici(Date inici) {
		this.inici = inici;
	}

	public Integer getNum() {
		return this.num;
	}

	public void setNum(Integer num) {
		this.num = num;
	}

	public Integer getSupervisor() {
		return this.supervisor;
	}

	public void setSupervisor(Integer supervisor) {
		this.supervisor = supervisor;
	}

	public Boolean getVigent() {
		return this.vigent;
	}

	public void setVigent(Boolean vigent) {
		this.vigent = vigent;
	}

	public Organ getOrgan() {
		return this.organ;
	}

	public void setOrgan(Organ organ) {
		this.organ = organ;
	}

	public Rol getRol() {
		return this.rol;
	}

	public void setRol(Rol rol) {
		this.rol = rol;
	}

	public Usuari getUsuari() {
		return this.usuari;
	}

	public void setUsuari(Usuari usuariBean) {
		this.usuari = usuariBean;
	}

}