Last change
on this file since 277b400 was 336d09e, checked in by Vzdra <vladko.zdravkovski@…>, 3 years ago |
cleanup
|
-
Property mode
set to
100644
|
File size:
1.0 KB
|
Rev | Line | |
---|
[b24fe9b] | 1 | package it.finki.tinki.model.dto;
|
---|
| 2 |
|
---|
| 3 | import it.finki.tinki.model.Address;
|
---|
| 4 | import it.finki.tinki.model.Jobs.Internship;
|
---|
| 5 | import it.finki.tinki.model.Users.Company;
|
---|
| 6 | import it.finki.tinki.model.enumerator.AccountType;
|
---|
| 7 | import lombok.Data;
|
---|
| 8 |
|
---|
| 9 | @Data
|
---|
| 10 | public class InternshipResponseDTO {
|
---|
| 11 | Long id;
|
---|
| 12 | String title;
|
---|
| 13 | String description;
|
---|
| 14 | int salary;
|
---|
| 15 | int openSpots;
|
---|
| 16 | String accountEmail;
|
---|
| 17 | String accountName;
|
---|
| 18 | AccountType accountType;
|
---|
| 19 | Address accountAddress;
|
---|
| 20 |
|
---|
| 21 | public InternshipResponseDTO(Internship internship){
|
---|
| 22 | this.id = internship.getId();
|
---|
| 23 | this.title = internship.getTitle();
|
---|
| 24 | this.description = internship.getDescription();
|
---|
| 25 | this.salary = internship.getSalary();
|
---|
| 26 | this.openSpots = internship.getOpenSpots();
|
---|
| 27 | this.accountEmail = internship.getAccount().getEmail();
|
---|
| 28 | this.accountName = internship.getAccount().getName();
|
---|
| 29 | this.accountType = internship.getAccount().getAccountType();
|
---|
| 30 | this.accountAddress = ((Company) internship.getAccount()).getAddress();
|
---|
| 31 | }
|
---|
| 32 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.