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
Files:
9 added
4 deleted
1 edited
11 moved

Legend:

Unmodified
Added
Removed
  • src/main/java/it/finki/tinki/model/EmbeddedMatchId.java

    rbd38a55 rbd46dbb  
    11package it.finki.tinki.model;
    22
    3 import it.finki.tinki.model.Jobs.Work;
     3import it.finki.tinki.model.Work.Work;
    44import it.finki.tinki.model.Users.User;
    55import lombok.Data;
  • src/main/java/it/finki/tinki/model/Work/Internship.java

    rbd38a55 rbd46dbb  
    1 package it.finki.tinki.model.Jobs;
     1package it.finki.tinki.model.Work;
    22
    33import it.finki.tinki.model.Skill;
  • src/main/java/it/finki/tinki/model/Work/Job.java

    rbd38a55 rbd46dbb  
    1 package it.finki.tinki.model.Jobs;
     1package it.finki.tinki.model.Work;
    22
    33import it.finki.tinki.model.Skill;
  • src/main/java/it/finki/tinki/model/Work/Project.java

    rbd38a55 rbd46dbb  
    1 package it.finki.tinki.model.Jobs;
     1package it.finki.tinki.model.Work;
    22
    33import it.finki.tinki.model.Skill;
  • src/main/java/it/finki/tinki/model/Work/Work.java

    rbd38a55 rbd46dbb  
    1 package it.finki.tinki.model.Jobs;
     1package it.finki.tinki.model.Work;
    22
    33import it.finki.tinki.model.Users.Account;
  • src/main/java/it/finki/tinki/model/dto/register/account/AccountRegisterDTO.java

    rbd38a55 rbd46dbb  
    1 package it.finki.tinki.model.dto;
     1package it.finki.tinki.model.dto.register.account;
    22
    33import lombok.Data;
    44
    55@Data
    6 public class TeamRegisterDTO {
     6public class AccountRegisterDTO {
    77    String email;
    88    String password;
    99    String name;
    10     int members;
    1110}
  • src/main/java/it/finki/tinki/model/dto/register/account/UserRegisterDTO.java

    rbd38a55 rbd46dbb  
    1 package it.finki.tinki.model.dto;
     1package it.finki.tinki.model.dto.register.account;
    22
    33import lombok.Data;
     
    66
    77@Data
    8 public class UserRegisterDTO {
    9     String email;
    10     String password;
    11     String name;
     8public class UserRegisterDTO extends AccountRegisterDTO {
    129    String surname;
    1310    List<Long> retainedSkills;
  • 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.