Changeset 33d4f5d for src/main/java/it/finki/tinki/model/dto/response
- Timestamp:
- 01/12/21 02:42:18 (4 years ago)
- Branches:
- master
- Children:
- a70db1a
- Parents:
- 8f1f460
- Location:
- src/main/java/it/finki/tinki/model/dto/response/work
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
src/main/java/it/finki/tinki/model/dto/response/work/InternshipResponseDTO.java
r8f1f460 r33d4f5d 2 2 3 3 import it.finki.tinki.model.Address; 4 import it.finki.tinki.model.Skill; 4 5 import it.finki.tinki.model.Work.Internship; 5 6 import it.finki.tinki.model.Users.Company; 6 7 import lombok.Data; 8 9 import java.util.List; 7 10 8 11 @Data … … 11 14 int openSpots; 12 15 Address accountAddress; 16 List<Skill> skillsTrained; 17 18 public InternshipResponseDTO(){ 19 super(); 20 } 13 21 14 22 public InternshipResponseDTO(Internship internship){ … … 17 25 this.openSpots = internship.getOpenSpots(); 18 26 this.accountAddress = ((Company) internship.getAccount()).getAddress(); 27 this.skillsTrained = internship.getSkillsTrained(); 19 28 } 20 29 } -
src/main/java/it/finki/tinki/model/dto/response/work/JobResponseDTO.java
r8f1f460 r33d4f5d 2 2 3 3 import it.finki.tinki.model.Address; 4 import it.finki.tinki.model.Skill; 4 5 import it.finki.tinki.model.Work.Job; 5 6 import it.finki.tinki.model.Users.Company; … … 8 9 import lombok.Data; 9 10 11 import java.util.List; 12 10 13 @Data 11 14 public class JobResponseDTO extends WorkResponseDTO { 12 15 Address accountAddress; 13 16 int members; 17 List<Skill> skillsRequired; 18 19 public JobResponseDTO(){ 20 super(); 21 } 14 22 15 23 public JobResponseDTO(Job job){ 16 24 super(job.getId(), job.getTitle(), job.getDescription(), job.getSalary(), job.getAccount()); 25 this.skillsRequired = job.getSkillsRequired(); 17 26 if(job.getAccount().getAccountType()==AccountType.COMPANY){ 18 27 this.accountAddress = ((Company) job.getAccount()).getAddress(); -
src/main/java/it/finki/tinki/model/dto/response/work/ProjectResponseDTO.java
r8f1f460 r33d4f5d 1 1 package it.finki.tinki.model.dto.response.work; 2 2 3 import it.finki.tinki.model.Skill; 3 4 import it.finki.tinki.model.Work.Project; 4 5 import it.finki.tinki.model.Users.Team; 5 6 import lombok.Data; 6 7 8 import java.util.Date; 9 import java.util.List; 10 7 11 @Data 8 12 public class ProjectResponseDTO extends WorkResponseDTO { 9 13 int members; 14 Date validUntil; 15 List<Skill> skillsRequired; 16 17 public ProjectResponseDTO(){ 18 super(); 19 } 10 20 11 21 public ProjectResponseDTO(Project project){ 12 22 super(project.getId(), project.getTitle(), project.getDescription(), project.getSalary(), project.getAccount()); 13 23 this.members = ((Team) project.getAccount()).getMembers(); 24 this.validUntil = project.getValidUntil(); 25 this.skillsRequired = project.getSkillsRequired(); 14 26 } 15 27 } -
src/main/java/it/finki/tinki/model/dto/response/work/WorkResponseDTO.java
r8f1f460 r33d4f5d 14 14 String accountName; 15 15 AccountType accountType; 16 String error; 16 17 17 WorkResponseDTO(){} 18 WorkResponseDTO(){ 19 this.error = "Error registering job!"; 20 } 18 21 19 22 WorkResponseDTO(Long id, String title, String description, int salary, Account account){ 23 this.error = null; 20 24 this.id = id; 21 25 this.title = title;
Note:
See TracChangeset
for help on using the changeset viewer.