Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@
import java.time.LocalDateTime;

public class ApplicationForCompanyDTO {
public Long applicationId;
private Long applicationId;

@JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss")
public LocalDateTime applicationDate;
private LocalDateTime applicationDate;

public Long vacancyId;
public String vacancyTitle;
public Long studentId;
public String studentName;
public String studentCourse;
private Long vacancyId;
private String vacancyTitle;
private Long studentId;
private String studentName;
private String studentCourse;

public ApplicationForCompanyDTO(Long applicationId, LocalDateTime applicationDate, Long vacancyId, String vacancyTitle, Long studentId, String studentName, String studentCourse) {
this.applicationId = applicationId;
Expand All @@ -25,4 +25,62 @@ public ApplicationForCompanyDTO(Long applicationId, LocalDateTime applicationDat
this.studentName = studentName;
this.studentCourse = studentCourse;
}

// --- Getters e Setters ---

public Long getApplicationId() {
return applicationId;
}

public void setApplicationId(Long applicationId) {
this.applicationId = applicationId;
}

public LocalDateTime getApplicationDate() {
return applicationDate;
}

public void setApplicationDate(LocalDateTime applicationDate) {
this.applicationDate = applicationDate;
}

public Long getVacancyId() {
return vacancyId;
}

public void setVacancyId(Long vacancyId) {
this.vacancyId = vacancyId;
}

public String getVacancyTitle() {
return vacancyTitle;
}

public void setVacancyTitle(String vacancyTitle) {
this.vacancyTitle = vacancyTitle;
}

public Long getStudentId() {
return studentId;
}

public void setStudentId(Long studentId) {
this.studentId = studentId;
}

public String getStudentName() {
return studentName;
}

public void setStudentName(String studentName) {
this.studentName = studentName;
}

public String getStudentCourse() {
return studentCourse;
}

public void setStudentCourse(String studentCourse) {
this.studentCourse = studentCourse;
}
}
60 changes: 51 additions & 9 deletions backend/src/main/java/com/va2es/backend/dto/CompanyRequestDTO.java
Original file line number Diff line number Diff line change
@@ -1,24 +1,66 @@
package com.va2es.backend.dto;


import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;

public class CompanyRequestDTO {

@NotBlank(message = "O nome da empresa é obrigatório.")
public String nomeDaEmpresa;
@Size(min = 2, max = 100, message = "O nome da empresa deve ter entre 2 e 100 caracteres.")
private String nomeDaEmpresa;

@NotNull(message = "O telefone é obrigatório.")
public String telefone;
@NotBlank(message = "O telefone é obrigatório.")
private String telefone;

@NotNull(message = "O CNPJ é obrigatório.")
public String cnpj;
@NotBlank(message = "O CNPJ é obrigatório.")
private String cnpj;

@NotBlank(message = "A área de atuação é obrigatória.")
public String areaDeAtuacao;
private String areaDeAtuacao;

@NotNull(message = "O ID do representante da empresa é obrigatório.")
public Long representanteDaEmpresaId;
}
private Long representanteDaEmpresaId;

// --- Getters and Setters ---

public String getNomeDaEmpresa() {
return nomeDaEmpresa;
}

public void setNomeDaEmpresa(String nomeDaEmpresa) {
this.nomeDaEmpresa = nomeDaEmpresa;
}

public String getTelefone() {
return telefone;
}

public void setTelefone(String telefone) {
this.telefone = telefone;
}

public String getCnpj() {
return cnpj;
}

public void setCnpj(String cnpj) {
this.cnpj = cnpj;
}

public String getAreaDeAtuacao() {
return areaDeAtuacao;
}

public void setAreaDeAtuacao(String areaDeAtuacao) {
this.areaDeAtuacao = areaDeAtuacao;
}

public Long getRepresentanteDaEmpresaId() {
return representanteDaEmpresaId;
}

public void setRepresentanteDaEmpresaId(Long representanteDaEmpresaId) {
this.representanteDaEmpresaId = representanteDaEmpresaId;
}
}
91 changes: 51 additions & 40 deletions backend/src/main/java/com/va2es/backend/dto/CompanyResponseDTO.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,45 +6,56 @@ public class CompanyResponseDTO {
private final String telefone;
private final String cnpj;
private final String areaDeAtuacao;
private final Long representanteDaEmpresaId;
private final String representanteDaEmpresaNome;

public CompanyResponseDTO(Long id, String nomeDaEmpresa, String telefone, String cnpj, String areaDeAtuacao, Long representanteDaEmpresaId, String representanteDaEmpresaNome) {
this.id = id;
this.nomeDaEmpresa = nomeDaEmpresa;
this.telefone = telefone;
this.cnpj = cnpj;
this.areaDeAtuacao = areaDeAtuacao;
this.representanteDaEmpresaId = representanteDaEmpresaId;
this.representanteDaEmpresaNome = representanteDaEmpresaNome;
}

// Getters
public Long getId() {
return id;
}

public String getNomeDaEmpresa() {
return nomeDaEmpresa;
}

public String getTelefone() {
return telefone;
}

public String getCnpj() {
return cnpj;
}

public String getAreaDeAtuacao() {
return areaDeAtuacao;
}

public Long getRepresentanteDaEmpresaId() {
return representanteDaEmpresaId;
}

public String getRepresentanteDaEmpresaNome() {
return representanteDaEmpresaNome;
private final Long idDoRepresentante;
private final String nomeDoRepresentante;

// Construtor privado que usa o Builder
private CompanyResponseDTO(Builder builder) {
this.id = builder.id;
this.nomeDaEmpresa = builder.nomeDaEmpresa;
this.telefone = builder.telefone;
this.cnpj = builder.cnpj;
this.areaDeAtuacao = builder.areaDeAtuacao;
this.idDoRepresentante = builder.idDoRepresentante;
this.nomeDoRepresentante = builder.nomeDoRepresentante;
}

// Apenas Getters
public Long getId() { return id; }
public String getNomeDaEmpresa() { return nomeDaEmpresa; }
public String getTelefone() { return telefone; }
public String getCnpj() { return cnpj; }
public String getAreaDeAtuacao() { return areaDeAtuacao; }
public Long getIdDoRepresentante() { return idDoRepresentante; }
public String getNomeDoRepresentante() { return nomeDoRepresentante; }

// Método estático para iniciar o Builder
public static Builder builder() {
return new Builder();
}

// Classe Builder
public static final class Builder {
private Long id;
private String nomeDaEmpresa;
private String telefone;
private String cnpj;
private String areaDeAtuacao;
private Long idDoRepresentante;
private String nomeDoRepresentante;

private Builder() {}

public Builder id(Long id) { this.id = id; return this; }
public Builder nomeDaEmpresa(String nomeDaEmpresa) { this.nomeDaEmpresa = nomeDaEmpresa; return this; }
public Builder telefone(String telefone) { this.telefone = telefone; return this; }
public Builder cnpj(String cnpj) { this.cnpj = cnpj; return this; }
public Builder areaDeAtuacao(String areaDeAtuacao) { this.areaDeAtuacao = areaDeAtuacao; return this; }
public Builder idDoRepresentante(Long idDoRepresentante) { this.idDoRepresentante = idDoRepresentante; return this; }
public Builder nomeDoRepresentante(String nomeDoRepresentante) { this.nomeDoRepresentante = nomeDoRepresentante; return this; }

public CompanyResponseDTO build() {
return new CompanyResponseDTO(this);
}
}
}
54 changes: 48 additions & 6 deletions backend/src/main/java/com/va2es/backend/dto/StudentPublicDTO.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package com.va2es.backend.dto;

public class StudentPublicDTO {
public String fullName;
public int currentPeriod;
public String phone;
public String course;
public String academicSummary;
private String fullName;
private int currentPeriod;
private String phone;
private String course;
private String academicSummary;

public StudentPublicDTO(String fullName, int currentPeriod, String phone, String course, String academicSummary) {
this.fullName = fullName;
Expand All @@ -14,4 +14,46 @@ public StudentPublicDTO(String fullName, int currentPeriod, String phone, String
this.course = course;
this.academicSummary = academicSummary;
}
}

// --- Getters and Setters ---

public String getFullName() {
return fullName;
}

public void setFullName(String fullName) {
this.fullName = fullName;
}

public int getCurrentPeriod() {
return currentPeriod;
}

public void setCurrentPeriod(int currentPeriod) {
this.currentPeriod = currentPeriod;
}

public String getPhone() {
return phone;
}

public void setPhone(String phone) {
this.phone = phone;
}

public String getCourse() {
return course;
}

public void setCourse(String course) {
this.course = course;
}

public String getAcademicSummary() {
return academicSummary;
}

public void setAcademicSummary(String academicSummary) {
this.academicSummary = academicSummary;
}
}
Loading