Last change
on this file since a3d2b0d was b31afbd, checked in by Vzdra <vladko.zdravkovski@…>, 4 years ago |
fixed some bugs and finalized user registration
|
-
Property mode
set to
100644
|
File size:
753 bytes
|
Line | |
---|
1 | package it.finki.tinki.model.Users;
|
---|
2 |
|
---|
3 | import com.sun.istack.NotNull;
|
---|
4 | import it.finki.tinki.model.enumerator.AccountType;
|
---|
5 | import lombok.Data;
|
---|
6 |
|
---|
7 | import javax.persistence.*;
|
---|
8 |
|
---|
9 | @Entity
|
---|
10 | @Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
|
---|
11 | @Data
|
---|
12 | public abstract class Account {
|
---|
13 |
|
---|
14 | @Id
|
---|
15 | @GeneratedValue(strategy = GenerationType.AUTO)
|
---|
16 | Long id;
|
---|
17 |
|
---|
18 | @Column(unique = true)
|
---|
19 | @NotNull
|
---|
20 | String email;
|
---|
21 |
|
---|
22 | @NotNull
|
---|
23 | String password;
|
---|
24 |
|
---|
25 | @NotNull
|
---|
26 | String name;
|
---|
27 |
|
---|
28 | AccountType accountType;
|
---|
29 |
|
---|
30 | public Account(){}
|
---|
31 |
|
---|
32 | public Account(String email, String password, String name, AccountType accountType) {
|
---|
33 | this.email = email;
|
---|
34 | this.password = password;
|
---|
35 | this.name = name;
|
---|
36 | this.accountType = accountType;
|
---|
37 | }
|
---|
38 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.