From df070ca7312fd82592918046a152aab6e71eca57 Mon Sep 17 00:00:00 2001 From: Giuli1297 Date: Thu, 28 Oct 2021 15:45:29 -0300 Subject: [PATCH] Anotaciones de BD --- curriculumsearch/src/main/java/com/roshka/modelo/Postulante.java | 18 ++++++++++++++++++ curriculumsearch/src/main/resources/application.properties | 13 +++++++++++++ 2 files changed, 31 insertions(+) diff --git a/curriculumsearch/src/main/java/com/roshka/modelo/Postulante.java b/curriculumsearch/src/main/java/com/roshka/modelo/Postulante.java index 5649548..a038445 100644 --- a/curriculumsearch/src/main/java/com/roshka/modelo/Postulante.java +++ b/curriculumsearch/src/main/java/com/roshka/modelo/Postulante.java @@ -1,32 +1,50 @@ package com.roshka.modelo; +import javax.persistence.*; import java.util.Date; + +@Entity +@Table(name="postulante") public class Postulante { + @Id + @GeneratedValue(strategy = GenerationType.AUTO) private long id; + @Column(name="nombre") private String nombre; + @Column(name = "apellido") private String apellido; + @Column(name = "ci") private String ci; + @Column(name = "correo") private String correo; + @Column(name = "ciudad") private String ciudad; + @Column(name = "telefono") private String telefono; + @Column(name = "fecha_nacimiento") private Date fechaNacimiento; + @Column(name = "resumen") private String resumen; + @Column(name = "nivel_ingles") private long nivelIngles; + @Column(name = "curriculum") private String curriculum; + @Column(name = "modalidad") private String modalidad; + @Column(name = "disponibilidad") private String disponibilidad; public long getId() { diff --git a/curriculumsearch/src/main/resources/application.properties b/curriculumsearch/src/main/resources/application.properties index 8b13789..caa9bf4 100644 --- a/curriculumsearch/src/main/resources/application.properties +++ b/curriculumsearch/src/main/resources/application.properties @@ -1 +1,14 @@ +spring.jpa.hibernate.ddl-auto=create-drop + +spring.sql.init.mode=always +spring.sql.init.platform=postgres +spring.datasource.url=jdbc:postgresql://localhost:5432/thumano +spring.datasource.username=postgres +spring.datasource.password=postgres +spring.jpa.properties.hibernate.jdbc.lob.non_contextual_creation=true + +server.port=8888 +spring.mvc.view.prefix=/WEB-INF/views/ +spring.mvc.view.suffix=.jsp + -- libgit2 0.26.0