|
|
@ -5,36 +5,27 @@ import jakarta.persistence.*; |
|
|
|
import java.sql.Timestamp; |
|
|
|
|
|
|
|
@Entity |
|
|
|
@Table(name = "foro_principal", schema = "foro", catalog = "") |
|
|
|
public class ForoPrincipalEntity { |
|
|
|
@Table(name = "foro", schema = "foro", catalog = "") |
|
|
|
public class ForoEntity { |
|
|
|
@GeneratedValue(strategy = GenerationType.IDENTITY) |
|
|
|
@Id |
|
|
|
@Column(name = "id", nullable = false) |
|
|
|
private int id; |
|
|
|
@Basic |
|
|
|
@Column(name = "titulo", nullable = true, length = 45) |
|
|
|
@Column(name = "titulo", nullable = true, length = 150) |
|
|
|
private String titulo; |
|
|
|
@Basic |
|
|
|
@Column(name = "descripcion", nullable = true, length = 45) |
|
|
|
@Column(name = "descripcion", nullable = true, length = 150) |
|
|
|
private String descripcion; |
|
|
|
@Basic |
|
|
|
@Column(name = "fechaYHora", nullable = true) |
|
|
|
private Timestamp fechaYHora; |
|
|
|
@Basic |
|
|
|
@Column(name = "autors_id", nullable = false) |
|
|
|
private int autorsId; |
|
|
|
@Basic |
|
|
|
@Column(name = "imagen_id", nullable = false) |
|
|
|
private int imagenId; |
|
|
|
@Basic |
|
|
|
@Column(name = "users_id", nullable = false) |
|
|
|
private int usersId; |
|
|
|
@Basic |
|
|
|
@Column(name = "categoria_foro_id", nullable = false) |
|
|
|
private int categoriaForoId; |
|
|
|
@Basic |
|
|
|
@Column(name = "Respuestas_id", nullable = false) |
|
|
|
private int respuestasId; |
|
|
|
|
|
|
|
public int getId() { |
|
|
|
return id; |
|
|
@ -68,14 +59,6 @@ public class ForoPrincipalEntity { |
|
|
|
this.fechaYHora = fechaYHora; |
|
|
|
} |
|
|
|
|
|
|
|
public int getAutorsId() { |
|
|
|
return autorsId; |
|
|
|
} |
|
|
|
|
|
|
|
public void setAutorsId(int autorsId) { |
|
|
|
this.autorsId = autorsId; |
|
|
|
} |
|
|
|
|
|
|
|
public int getImagenId() { |
|
|
|
return imagenId; |
|
|
|
} |
|
|
@ -84,14 +67,6 @@ public class ForoPrincipalEntity { |
|
|
|
this.imagenId = imagenId; |
|
|
|
} |
|
|
|
|
|
|
|
public int getUsersId() { |
|
|
|
return usersId; |
|
|
|
} |
|
|
|
|
|
|
|
public void setUsersId(int usersId) { |
|
|
|
this.usersId = usersId; |
|
|
|
} |
|
|
|
|
|
|
|
public int getCategoriaForoId() { |
|
|
|
return categoriaForoId; |
|
|
|
} |
|
|
@ -100,27 +75,16 @@ public class ForoPrincipalEntity { |
|
|
|
this.categoriaForoId = categoriaForoId; |
|
|
|
} |
|
|
|
|
|
|
|
public int getRespuestasId() { |
|
|
|
return respuestasId; |
|
|
|
} |
|
|
|
|
|
|
|
public void setRespuestasId(int respuestasId) { |
|
|
|
this.respuestasId = respuestasId; |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public boolean equals(Object o) { |
|
|
|
if (this == o) return true; |
|
|
|
if (o == null || getClass() != o.getClass()) return false; |
|
|
|
|
|
|
|
ForoPrincipalEntity that = (ForoPrincipalEntity) o; |
|
|
|
ForoEntity that = (ForoEntity) o; |
|
|
|
|
|
|
|
if (id != that.id) return false; |
|
|
|
if (autorsId != that.autorsId) return false; |
|
|
|
if (imagenId != that.imagenId) return false; |
|
|
|
if (usersId != that.usersId) return false; |
|
|
|
if (categoriaForoId != that.categoriaForoId) return false; |
|
|
|
if (respuestasId != that.respuestasId) return false; |
|
|
|
if (titulo != null ? !titulo.equals(that.titulo) : that.titulo != null) return false; |
|
|
|
if (descripcion != null ? !descripcion.equals(that.descripcion) : that.descripcion != null) return false; |
|
|
|
if (fechaYHora != null ? !fechaYHora.equals(that.fechaYHora) : that.fechaYHora != null) return false; |
|
|
@ -134,11 +98,8 @@ public class ForoPrincipalEntity { |
|
|
|
result = 31 * result + (titulo != null ? titulo.hashCode() : 0); |
|
|
|
result = 31 * result + (descripcion != null ? descripcion.hashCode() : 0); |
|
|
|
result = 31 * result + (fechaYHora != null ? fechaYHora.hashCode() : 0); |
|
|
|
result = 31 * result + autorsId; |
|
|
|
result = 31 * result + imagenId; |
|
|
|
result = 31 * result + usersId; |
|
|
|
result = 31 * result + categoriaForoId; |
|
|
|
result = 31 * result + respuestasId; |
|
|
|
return result; |
|
|
|
} |
|
|
|
} |