Last change
on this file since 4a15c9c was 29c0ed0, checked in by Vzdra <vladko.zdravkovski@…>, 4 years ago |
added initial login functionality
|
-
Property mode
set to
100644
|
File size:
683 bytes
|
Rev | Line | |
---|
[e6ff724] | 1 | package it.finki.tinki.model.Users;
|
---|
| 2 |
|
---|
| 3 | import it.finki.tinki.model.enumerator.AccountType;
|
---|
| 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 Account {
|
---|
| 12 |
|
---|
| 13 | @Id
|
---|
| 14 | @GeneratedValue(strategy = GenerationType.AUTO)
|
---|
| 15 | Long id;
|
---|
| 16 |
|
---|
[29c0ed0] | 17 | @Column(unique = true)
|
---|
[e6ff724] | 18 | String email;
|
---|
[29c0ed0] | 19 |
|
---|
[e6ff724] | 20 | String password;
|
---|
| 21 |
|
---|
| 22 | String name;
|
---|
| 23 |
|
---|
| 24 | AccountType accountType;
|
---|
| 25 |
|
---|
| 26 | public Account(){}
|
---|
| 27 |
|
---|
| 28 | public Account(String email, String password, String name, AccountType accountType) {
|
---|
| 29 | this.email = email;
|
---|
| 30 | this.password = password;
|
---|
| 31 | this.name = name;
|
---|
| 32 | this.accountType = accountType;
|
---|
| 33 | }
|
---|
| 34 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.