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

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

constructor change

  • Property mode set to 100644
File size: 881 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
20 WorkResponseDTO(String item){
21 this.error = "Error registering " + item;
22 }
23
24 WorkResponseDTO(Long id, String title, String description, int salary, Account account){
25 this.error = null;
26 this.id = id;
27 this.title = title;
28 this.description = description;
29 this.salary = salary;
30 this.accountEmail = account.getEmail();
31 this.accountName = account.getName();
32 this.accountType = account.getAccountType();
33 }
34}
Note: See TracBrowser for help on using the repository browser.