source: src/main/java/it/finki/tinki/model/dto/response/work/WorkResponseDTO.java@ 33d4f5d

Last change on this file since 33d4f5d was 33d4f5d, checked in by Vzdra <vladko.zdravkovski@…>, 3 years ago

bugfixes and refactoring

  • Property mode set to 100644
File size: 842 bytes
Line 
1package it.finki.tinki.model.dto.response.work;
2
3import it.finki.tinki.model.Users.Account;
4import it.finki.tinki.model.enumerator.AccountType;
5import lombok.Data;
6
7@Data
8public class WorkResponseDTO {
9 Long id;
10 String title;
11 String description;
12 int salary;
13 String accountEmail;
14 String accountName;
15 AccountType accountType;
16 String error;
17
18 WorkResponseDTO(){
19 this.error = "Error registering job!";
20 }
21
22 WorkResponseDTO(Long id, String title, String description, int salary, Account account){
23 this.error = null;
24 this.id = id;
25 this.title = title;
26 this.description = description;
27 this.salary = salary;
28 this.accountEmail = account.getEmail();
29 this.accountName = account.getName();
30 this.accountType = account.getAccountType();
31 }
32}
Note: See TracBrowser for help on using the repository browser.