Ignore:
Timestamp:
01/08/21 23:47:41 (4 years ago)
Author:
Vzdra <vladko.zdravkovski@…>
Branches:
master
Children:
297bd16
Parents:
bd38a55
Message:

refactoring and response dto

Location:
src/main/java/it/finki/tinki/model/dto/response
Files:
3 added
5 moved

Legend:

Unmodified
Added
Removed
  • src/main/java/it/finki/tinki/model/dto/response/account/CompanyResponseDTO.java

    rbd38a55 rbd46dbb  
    1 package it.finki.tinki.model.dto;
     1package it.finki.tinki.model.dto.response.account;
    22
    33import it.finki.tinki.model.Address;
     4import it.finki.tinki.model.dto.response.work.InternshipResponseDTO;
     5import it.finki.tinki.model.dto.response.work.JobResponseDTO;
    46import lombok.Data;
    57
  • src/main/java/it/finki/tinki/model/dto/response/account/LoginResponseDTO.java

    rbd38a55 rbd46dbb  
    1 package it.finki.tinki.model.dto;
     1package it.finki.tinki.model.dto.response.account;
    22
    33import it.finki.tinki.model.enumerator.AccountType;
  • src/main/java/it/finki/tinki/model/dto/response/account/TeamResponseDTO.java

    rbd38a55 rbd46dbb  
    1 package it.finki.tinki.model.dto;
     1package it.finki.tinki.model.dto.response.account;
    22
     3import it.finki.tinki.model.dto.response.work.JobResponseDTO;
     4import it.finki.tinki.model.dto.response.work.ProjectResponseDTO;
    35import lombok.Data;
    46
     
    79
    810@Data
    9 public class TeamResponseDTO extends LoginResponseDTO{
     11public class TeamResponseDTO extends LoginResponseDTO {
    1012    private int members;
    1113    private List<JobResponseDTO> jobs;
  • src/main/java/it/finki/tinki/model/dto/response/account/UserResponseDTO.java

    rbd38a55 rbd46dbb  
    1 package it.finki.tinki.model.dto;
     1package it.finki.tinki.model.dto.response.account;
    22
    33import it.finki.tinki.model.Skill;
     4import it.finki.tinki.model.dto.response.work.InternshipResponseDTO;
     5import it.finki.tinki.model.dto.response.work.JobResponseDTO;
     6import it.finki.tinki.model.dto.response.work.ProjectResponseDTO;
    47import lombok.Data;
    58
     
    811
    912@Data
    10 public class UserResponseDTO extends LoginResponseDTO{
     13public class UserResponseDTO extends LoginResponseDTO {
    1114    private String surname;
    1215    private List<Skill> retained;
  • src/main/java/it/finki/tinki/model/dto/response/work/JobResponseDTO.java

    rbd38a55 rbd46dbb  
    1 package it.finki.tinki.model.dto;
     1package it.finki.tinki.model.dto.response.work;
    22
    33import it.finki.tinki.model.Address;
    4 import it.finki.tinki.model.Jobs.Job;
     4import it.finki.tinki.model.Work.Job;
    55import it.finki.tinki.model.Users.Company;
    66import it.finki.tinki.model.Users.Team;
     
    99
    1010@Data
    11 public class JobResponseDTO {
    12     Long id;
    13     String title;
    14     String description;
    15     int salary;
    16     String accountEmail;
    17     String accountName;
    18     AccountType accountType;
     11public class JobResponseDTO extends WorkResponseDTO {
    1912    Address accountAddress;
    2013    int members;
    2114
    2215    public JobResponseDTO(Job job){
    23         this.id = job.getId();
    24         this.title = job.getTitle();
    25         this.description = job.getDescription();
    26         this.salary = job.getSalary();
    27         this.accountEmail = job.getAccount().getEmail();
    28         this.accountName = job.getAccount().getName();
    29         this.accountType = job.getAccount().getAccountType();
     16        super(job.getId(), job.getTitle(), job.getDescription(), job.getSalary(), job.getAccount());
    3017        if(job.getAccount().getAccountType()==AccountType.COMPANY){
    3118            this.accountAddress = ((Company) job.getAccount()).getAddress();
Note: See TracChangeset for help on using the changeset viewer.