source: src/main/java/it/finki/tinki/model/Users/Account.java@ 336d09e

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

fixed some bugs and finalized user registration

  • Property mode set to 100644
File size: 753 bytes
RevLine 
[e6ff724]1package it.finki.tinki.model.Users;
2
[b31afbd]3import com.sun.istack.NotNull;
[e6ff724]4import it.finki.tinki.model.enumerator.AccountType;
5import lombok.Data;
6
7import javax.persistence.*;
8
9@Entity
10@Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
11@Data
12public abstract class Account {
13
14 @Id
15 @GeneratedValue(strategy = GenerationType.AUTO)
16 Long id;
17
[29c0ed0]18 @Column(unique = true)
[b31afbd]19 @NotNull
[e6ff724]20 String email;
[29c0ed0]21
[b31afbd]22 @NotNull
[e6ff724]23 String password;
24
[b31afbd]25 @NotNull
[e6ff724]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.