package com.dacrt.SBIABackend.security.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;

import org.springframework.lang.NonNull;

import com.dacrt.SBIABackend.security.enums.RolNombre;

@Entity
@Table(name = "rol",schema = "original_data")
public class Rol {
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private int id;
	@NotNull
	private String rolNombre;
	
	@NotNull
	@Column(columnDefinition = "int4 not null default 1")
	private int activo;
	@NonNull
	@Column(columnDefinition = "character varying(100) not null default 'x'")
	private String registradoPor;
	@NonNull
	@Column(columnDefinition = "character varying(100) not null default 'x'")
	private String modificadoPor;
	@NonNull
	@Column(columnDefinition = "timestamp without time zone NOT NULL default now()")
	private Date fechaRegistro;
	@Column(name = "fechaModificacion")
	private Date fechaModificacion;
	
	
	public Rol() {
	}

	
	public Rol(@NotNull String rolNombre) {
		super();
		this.rolNombre = rolNombre;
	}


	public int getId() {
		return id;
	}

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

	public String getRolNombre() {
		return rolNombre;
	}

	public void setRolNombre(String rolNombre) {
		this.rolNombre = rolNombre;
	}


	public int getActivo() {
		return activo;
	}


	public void setActivo(int activo) {
		this.activo = activo;
	}


	public String getRegistradoPor() {
		return registradoPor;
	}


	public void setRegistradoPor(String registradoPor) {
		this.registradoPor = registradoPor;
	}


	public String getModificadoPor() {
		return modificadoPor;
	}


	public void setModificadoPor(String modificadoPor) {
		this.modificadoPor = modificadoPor;
	}


	public Date getFechaRegistro() {
		return fechaRegistro;
	}


	public void setFechaRegistro(Date fechaRegistro) {
		this.fechaRegistro = fechaRegistro;
	}


	public Date getFechaModificacion() {
		return fechaModificacion;
	}


	public void setFechaModificacion(Date fechaModificacion) {
		this.fechaModificacion = fechaModificacion;
	}
	
}
