source: src/main/java/it/finki/tinki/model/Work/Work.java@ bd46dbb

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

refactoring and response dto

  • Property mode set to 100644
File size: 671 bytes
Line 
1package it.finki.tinki.model.Work;
2
3import it.finki.tinki.model.Users.Account;
4import lombok.Data;
5
6import javax.persistence.*;
7
8@Entity
9@Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
10@Data
11public 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.