Skip to content
This repository has been archived by the owner on Nov 8, 2024. It is now read-only.

Commit

Permalink
fix: upd anotações p/ resolver bug "JDBCTypeException"
Browse files Browse the repository at this point in the history
Atualizar e anotar todas as Classes presentes no projeto
  • Loading branch information
lucas0headshot committed Mar 19, 2024
1 parent 3735817 commit ada4871
Show file tree
Hide file tree
Showing 14 changed files with 151 additions and 41 deletions.
13 changes: 13 additions & 0 deletions backend/src/main/java/com/senac/gestaocurso/models/Aula.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,13 @@ public class Aula extends EntityID {
@JoinColumn(name = "materia_id")
private Materia materia;

@Column
private LocalDate dia;

@ManyToOne(cascade = CascadeType.ALL)
@JoinColumn(name = "professor_id")
private Funcionario professor;



public Aula(){}
Expand All @@ -38,6 +43,14 @@ public void setDia(LocalDate dia) {
this.dia = dia;
}

public Funcionario getProfessor() {
return professor;
}

public void setProfessor(Funcionario professor) {
this.professor = professor;
}



@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,13 @@ public class Avaliacao extends EntityID {
@JoinColumn(name = "aluno_id")
private Inscricao aluno;

@Column
private String nome;

@Column
private Integer nota;

@Column
private LocalDate data;


Expand Down
3 changes: 3 additions & 0 deletions backend/src/main/java/com/senac/gestaocurso/models/Cargo.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,13 @@

@Entity
public class Cargo extends EntityID {
@Column
private String descricao;

@Column
private String nivel;

@Column
private Boolean comissionado;


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,25 @@

@Entity
public class Certificacoes extends EntityID {

@Column
private String nome;

@Column
private Integer cargaHoraria;

@Column
private LocalDate dataEmissao;

@ManyToOne(cascade = CascadeType.ALL)
@JoinColumn(name = "funcionario_id")
private Funcionario funcionario;



public Certificacoes() {
}


public Funcionario getFuncionario() {
return funcionario;
}
Expand All @@ -28,12 +36,6 @@ public void setFuncionario(Funcionario funcionario) {
this.funcionario = funcionario;
}


public Certificacoes() {
}



public String getNome() {
return nome;
}
Expand Down
9 changes: 5 additions & 4 deletions backend/src/main/java/com/senac/gestaocurso/models/Curso.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,21 @@

import jakarta.persistence.*;

import java.util.List;



@Entity
public class Curso extends EntityID {

@Column
private String nome;

@Column
private String descricao;


@ManyToOne(cascade = CascadeType.ALL)
@JoinColumn(name = "coordenador_id")
private Funcionario coordenador;

@Column
private Integer cargaHorariaTotal;


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,28 @@

@Entity
public class DadosBancarios extends EntityID {
@Column
private String banco;

@Column
private String agencia;

@Column
private String conta;

@Enumerated(EnumType.STRING)
private TipoContaBancaria tipoContaBancaria;

@ManyToOne(cascade = CascadeType.ALL)
@JoinColumn(name = "funcionario_id")
private Funcionario funcionario;



public DadosBancarios() {
}


public Funcionario getFuncionario() {
return funcionario;
}
Expand All @@ -28,12 +38,6 @@ public void setFuncionario(Funcionario funcionario) {
this.funcionario = funcionario;
}


public DadosBancarios() {
}



public String getBanco() {
return banco;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,22 @@
import com.senac.gestaocurso.enums.Escolaridade;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.EnumType;
import jakarta.persistence.Enumerated;

import java.time.LocalDate;



@Entity
public class Dependentes extends EntityID {
@Column
private String nome;

@Enumerated(EnumType.STRING)
private Escolaridade escolaridade;

@Column
private LocalDate dataNasc;


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,23 @@ public class ExpAnterior extends EntityID {
@JoinColumn(name = "cargo_id")
private Cargo cargo;

@Column
private LocalDate periodoFinal;

@Column
private LocalDate peridoInicial;

@ManyToOne
@JoinColumn(name = "funcionario_id")
private Funcionario funcionario;



public ExpAnterior() {
}



public Funcionario getFuncionario() {
return funcionario;
}
Expand All @@ -35,12 +44,6 @@ public void setFuncionario(Funcionario funcionario) {
this.funcionario = funcionario;
}


public ExpAnterior() {
}



public String getDescricao() {
return descricao;
}
Expand Down
18 changes: 15 additions & 3 deletions backend/src/main/java/com/senac/gestaocurso/models/Feedback.java
Original file line number Diff line number Diff line change
@@ -1,26 +1,38 @@
package com.senac.gestaocurso.models;


import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.ManyToOne;
import jakarta.persistence.*;

import java.time.LocalDate;


@Entity
public class Feedback extends EntityID {
@ManyToOne(cascade = CascadeType.ALL)
@JoinColumn(name = "autor_id")
private Funcionario autor;

@Column
private String feedback;

@Column
private Integer nota;

@Column
private LocalDate data;

@ManyToOne(cascade = CascadeType.ALL)
@JoinColumn(name = "avaliado_id")
private Curso avaliado;


public Feedback() {

}




public Funcionario getAutor() {
return autor;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,16 @@

@Entity
public class Filiacao extends EntityID {
@Column
private String nomePai;

@Column
private String telefonePai;

@Column
private String nomeMae;

@Column
private String telefoneMae;


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

@Entity
public class Frequencia extends EntityID {
@Column
private Boolean frequencia;

@ManyToOne(cascade = CascadeType.ALL)
Expand All @@ -21,6 +22,13 @@ public class Frequencia extends EntityID {
@JoinColumn(name = "chamada_id")
private Chamada chamada;



public Frequencia() {
}



public Chamada getChamada() {
return chamada;
}
Expand All @@ -29,12 +37,6 @@ public void setChamada(Chamada chamada) {
this.chamada = chamada;
}


public Frequencia() {
}



public Boolean getFrequencia() {
return frequencia;
}
Expand Down
Loading

0 comments on commit ada4871

Please sign in to comment.