backend con panel admin funcional
Some checks failed
Deploy Spring Boot App / build-and-deploy (push) Has been cancelled
Some checks failed
Deploy Spring Boot App / build-and-deploy (push) Has been cancelled
This commit is contained in:
40
src/main/java/com/example/fercoganbackend/entity/Cabana.java
Normal file
40
src/main/java/com/example/fercoganbackend/entity/Cabana.java
Normal file
@@ -0,0 +1,40 @@
|
||||
package com.example.fercoganbackend.entity;
|
||||
|
||||
import jakarta.persistence.*;
|
||||
|
||||
// Cabaña
|
||||
@Entity
|
||||
@Table(name = "cabanas")
|
||||
public class Cabana {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
|
||||
private String nombre;
|
||||
private Boolean visible;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getNombre() {
|
||||
return nombre;
|
||||
}
|
||||
|
||||
public void setNombre(String nombre) {
|
||||
this.nombre = nombre;
|
||||
}
|
||||
|
||||
public Boolean getVisible() {
|
||||
return visible;
|
||||
}
|
||||
|
||||
public void setVisible(Boolean visible) {
|
||||
this.visible = visible;
|
||||
}
|
||||
}
|
||||
|
||||
108
src/main/java/com/example/fercoganbackend/entity/Lote.java
Normal file
108
src/main/java/com/example/fercoganbackend/entity/Lote.java
Normal file
@@ -0,0 +1,108 @@
|
||||
package com.example.fercoganbackend.entity;
|
||||
|
||||
import jakarta.persistence.*;
|
||||
|
||||
// Lote
|
||||
@Entity
|
||||
@Table(name = "lotes")
|
||||
public class Lote {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
|
||||
private String nombre;
|
||||
private Double precio;
|
||||
private String raza;
|
||||
private Double prelance;
|
||||
private Double puja;
|
||||
private String estado;
|
||||
private Boolean visible;
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "remate_id")
|
||||
private Remate remate;
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "cabana_id")
|
||||
private Cabana cabana;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getNombre() {
|
||||
return nombre;
|
||||
}
|
||||
|
||||
public void setNombre(String nombre) {
|
||||
this.nombre = nombre;
|
||||
}
|
||||
|
||||
public Double getPrecio() {
|
||||
return precio;
|
||||
}
|
||||
|
||||
public void setPrecio(Double precio) {
|
||||
this.precio = precio;
|
||||
}
|
||||
|
||||
public String getRaza() {
|
||||
return raza;
|
||||
}
|
||||
|
||||
public void setRaza(String raza) {
|
||||
this.raza = raza;
|
||||
}
|
||||
|
||||
public Double getPrelance() {
|
||||
return prelance;
|
||||
}
|
||||
|
||||
public void setPrelance(Double prelance) {
|
||||
this.prelance = prelance;
|
||||
}
|
||||
|
||||
public Double getPuja() {
|
||||
return puja;
|
||||
}
|
||||
|
||||
public void setPuja(Double puja) {
|
||||
this.puja = puja;
|
||||
}
|
||||
|
||||
public String getEstado() {
|
||||
return estado;
|
||||
}
|
||||
|
||||
public void setEstado(String estado) {
|
||||
this.estado = estado;
|
||||
}
|
||||
|
||||
public Boolean getVisible() {
|
||||
return visible;
|
||||
}
|
||||
|
||||
public void setVisible(Boolean visible) {
|
||||
this.visible = visible;
|
||||
}
|
||||
|
||||
public Remate getRemate() {
|
||||
return remate;
|
||||
}
|
||||
|
||||
public void setRemate(Remate remate) {
|
||||
this.remate = remate;
|
||||
}
|
||||
|
||||
public Cabana getCabana() {
|
||||
return cabana;
|
||||
}
|
||||
|
||||
public void setCabana(Cabana cabana) {
|
||||
this.cabana = cabana;
|
||||
}
|
||||
}
|
||||
86
src/main/java/com/example/fercoganbackend/entity/Puja.java
Normal file
86
src/main/java/com/example/fercoganbackend/entity/Puja.java
Normal file
@@ -0,0 +1,86 @@
|
||||
package com.example.fercoganbackend.entity;
|
||||
|
||||
import jakarta.persistence.*;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
// Puja
|
||||
@Entity
|
||||
@Table(name = "pujas")
|
||||
public class Puja {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
|
||||
private LocalDateTime fecha;
|
||||
private Double monto;
|
||||
private Boolean visible;
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "usuario_id")
|
||||
private Usuario usuario; // ya lo tienes
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "cabana_id")
|
||||
private Cabana cabana;
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "lote_id")
|
||||
private Lote lote;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public LocalDateTime getFecha() {
|
||||
return fecha;
|
||||
}
|
||||
|
||||
public void setFecha(LocalDateTime fecha) {
|
||||
this.fecha = fecha;
|
||||
}
|
||||
|
||||
public Double getMonto() {
|
||||
return monto;
|
||||
}
|
||||
|
||||
public void setMonto(Double monto) {
|
||||
this.monto = monto;
|
||||
}
|
||||
|
||||
public Boolean getVisible() {
|
||||
return visible;
|
||||
}
|
||||
|
||||
public void setVisible(Boolean visible) {
|
||||
this.visible = visible;
|
||||
}
|
||||
|
||||
public Usuario getUsuario() {
|
||||
return usuario;
|
||||
}
|
||||
|
||||
public void setUsuario(Usuario usuario) {
|
||||
this.usuario = usuario;
|
||||
}
|
||||
|
||||
public Cabana getCabana() {
|
||||
return cabana;
|
||||
}
|
||||
|
||||
public void setCabana(Cabana cabana) {
|
||||
this.cabana = cabana;
|
||||
}
|
||||
|
||||
public Lote getLote() {
|
||||
return lote;
|
||||
}
|
||||
|
||||
public void setLote(Lote lote) {
|
||||
this.lote = lote;
|
||||
}
|
||||
}
|
||||
80
src/main/java/com/example/fercoganbackend/entity/Remate.java
Normal file
80
src/main/java/com/example/fercoganbackend/entity/Remate.java
Normal file
@@ -0,0 +1,80 @@
|
||||
package com.example.fercoganbackend.entity;
|
||||
|
||||
import jakarta.persistence.*;
|
||||
|
||||
import java.time.LocalDate;
|
||||
|
||||
// Remate
|
||||
@Entity
|
||||
@Table(name = "remates")
|
||||
public class Remate {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
|
||||
private String nombre;
|
||||
private LocalDate fecha;
|
||||
private String urlListaLotes;
|
||||
private String estado;
|
||||
private Boolean visible;
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "cabana_id")
|
||||
private Cabana cabana;
|
||||
//getter and setter
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getNombre() {
|
||||
return nombre;
|
||||
}
|
||||
|
||||
public void setNombre(String nombre) {
|
||||
this.nombre = nombre;
|
||||
}
|
||||
|
||||
public LocalDate getFecha() {
|
||||
return fecha;
|
||||
}
|
||||
|
||||
public void setFecha(LocalDate fecha) {
|
||||
this.fecha = fecha;
|
||||
}
|
||||
|
||||
public String getUrlListaLotes() {
|
||||
return urlListaLotes;
|
||||
}
|
||||
|
||||
public void setUrlListaLotes(String urlListaLotes) {
|
||||
this.urlListaLotes = urlListaLotes;
|
||||
}
|
||||
|
||||
public String getEstado() {
|
||||
return estado;
|
||||
}
|
||||
|
||||
public void setEstado(String estado) {
|
||||
this.estado = estado;
|
||||
}
|
||||
|
||||
public Boolean getVisible() {
|
||||
return visible;
|
||||
}
|
||||
|
||||
public void setVisible(Boolean visible) {
|
||||
this.visible = visible;
|
||||
}
|
||||
|
||||
public Cabana getCabana() {
|
||||
return cabana;
|
||||
}
|
||||
|
||||
public void setCabana(Cabana cabana) {
|
||||
this.cabana = cabana;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user