Last change
on this file since 509cb95 was e6ff724, checked in by Vzdra <vladko.zdravkovski@…>, 4 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
671 bytes
|
Rev | Line | |
---|
[e6ff724] | 1 | package it.finki.tinki.model.Jobs;
|
---|
| 2 |
|
---|
| 3 | import it.finki.tinki.model.Users.Account;
|
---|
| 4 | import lombok.Data;
|
---|
| 5 |
|
---|
| 6 | import javax.persistence.*;
|
---|
| 7 |
|
---|
| 8 | @Entity
|
---|
| 9 | @Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
|
---|
| 10 | @Data
|
---|
| 11 | public abstract class Work {
|
---|
| 12 |
|
---|
| 13 | @Id
|
---|
| 14 | @GeneratedValue(strategy = GenerationType.AUTO)
|
---|
| 15 | Long id;
|
---|
| 16 |
|
---|
| 17 | String title;
|
---|
| 18 | String description;
|
---|
| 19 |
|
---|
| 20 | @ManyToOne(targetEntity = Account.class)
|
---|
| 21 | Account account;
|
---|
| 22 |
|
---|
| 23 | int salary;
|
---|
| 24 |
|
---|
| 25 | public Work(){}
|
---|
| 26 |
|
---|
| 27 | public Work(String title, String description, Account account, int salary) {
|
---|
| 28 | this.title = title;
|
---|
| 29 | this.description = description;
|
---|
| 30 | this.account = account;
|
---|
| 31 | this.salary = salary;
|
---|
| 32 | }
|
---|
| 33 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.