You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
104 lines
2.1 KiB
104 lines
2.1 KiB
package api.menu.playa.model;
|
|
|
|
import java.time.LocalDateTime;
|
|
|
|
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.SequenceGenerator;
|
|
import javax.persistence.Table;
|
|
|
|
import api.menu.playa.enums.RolesEnum;
|
|
|
|
@Entity
|
|
@Table(name = "neg_usuario")
|
|
public class Usuario {
|
|
|
|
@Id
|
|
@GeneratedValue(strategy = GenerationType.AUTO, generator = "usuario_id_gen")
|
|
@SequenceGenerator(name = "usuario_id_gen", sequenceName = "usuario_seq", allocationSize = 1)
|
|
@Column(name = "id")
|
|
private Long id;
|
|
|
|
@Column(name = "usuario", unique = true)
|
|
private String usuario;
|
|
|
|
@Column(name = "pass")
|
|
private String pass;
|
|
|
|
@Enumerated(EnumType.STRING)
|
|
@Column(name = "rol")
|
|
private RolesEnum rol;
|
|
|
|
@Column(name = "activo")
|
|
private Boolean activo;
|
|
|
|
@Column(name = "fecha_creacion")
|
|
private LocalDateTime fecha = LocalDateTime.now();
|
|
|
|
@Column(name = "nombre")
|
|
private String nombre;
|
|
|
|
public Long getId() {
|
|
return id;
|
|
}
|
|
|
|
public void setId(Long id) {
|
|
this.id = id;
|
|
}
|
|
|
|
|
|
public String getPass() {
|
|
return pass;
|
|
}
|
|
|
|
public void setPass(String pass) {
|
|
this.pass = pass;
|
|
}
|
|
|
|
public String getUsuario() {
|
|
return usuario;
|
|
}
|
|
|
|
public void setUsuario(String usuario) {
|
|
this.usuario = usuario;
|
|
}
|
|
|
|
public RolesEnum getRol() {
|
|
return rol;
|
|
}
|
|
|
|
public void setRol(RolesEnum rol) {
|
|
this.rol = rol;
|
|
}
|
|
|
|
public Boolean getActivo() {
|
|
return activo;
|
|
}
|
|
|
|
public void setActivo(Boolean activo) {
|
|
this.activo = activo;
|
|
}
|
|
|
|
public LocalDateTime getFecha() {
|
|
return fecha;
|
|
}
|
|
|
|
public void setFecha(LocalDateTime fecha) {
|
|
this.fecha = fecha;
|
|
}
|
|
|
|
public String getNombre() {
|
|
return nombre;
|
|
}
|
|
|
|
public void setNombre(String nombre) {
|
|
this.nombre = nombre;
|
|
}
|
|
|
|
|
|
}
|
|
|