Last change
on this file since 47067ae was a70db1a, checked in by Vzdra <vladko.zdravkovski@…>, 3 years ago |
constructor change
|
-
Property mode
set to
100644
|
File size:
881 bytes
|
Rev | Line | |
---|
[bd46dbb] | 1 | package it.finki.tinki.model.dto.response.work;
|
---|
| 2 |
|
---|
| 3 | import it.finki.tinki.model.Users.Account;
|
---|
| 4 | import it.finki.tinki.model.enumerator.AccountType;
|
---|
| 5 | import lombok.Data;
|
---|
| 6 |
|
---|
| 7 | @Data
|
---|
| 8 | public class WorkResponseDTO {
|
---|
| 9 | Long id;
|
---|
| 10 | String title;
|
---|
| 11 | String description;
|
---|
| 12 | int salary;
|
---|
| 13 | String accountEmail;
|
---|
| 14 | String accountName;
|
---|
| 15 | AccountType accountType;
|
---|
[33d4f5d] | 16 | String error;
|
---|
[bd46dbb] | 17 |
|
---|
[a70db1a] | 18 | WorkResponseDTO(){}
|
---|
| 19 |
|
---|
| 20 | WorkResponseDTO(String item){
|
---|
| 21 | this.error = "Error registering " + item;
|
---|
[33d4f5d] | 22 | }
|
---|
[bd46dbb] | 23 |
|
---|
| 24 | WorkResponseDTO(Long id, String title, String description, int salary, Account account){
|
---|
[33d4f5d] | 25 | this.error = null;
|
---|
[bd46dbb] | 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.