Last change
on this file since 3fc9e50 was 3fc9e50, checked in by KostaFortumanov <kfortumanov@…>, 3 years ago |
prototip part1
|
-
Property mode
set to
100644
|
File size:
1.3 KB
|
Line | |
---|
1 | package it.finki.charitable.security;
|
---|
2 |
|
---|
3 | import it.finki.charitable.entities.AppUser;
|
---|
4 |
|
---|
5 | import javax.persistence.*;
|
---|
6 |
|
---|
7 | @Entity
|
---|
8 | @Table(name = "confirmation_token")
|
---|
9 | public class ConfirmationToken {
|
---|
10 |
|
---|
11 | @SequenceGenerator(
|
---|
12 | name = "conf_token_sequence",
|
---|
13 | sequenceName = "conf_token_sequence",
|
---|
14 | allocationSize = 1
|
---|
15 | )
|
---|
16 | @GeneratedValue(
|
---|
17 | strategy = GenerationType.SEQUENCE,
|
---|
18 | generator = "conf_token_sequence"
|
---|
19 | )
|
---|
20 | @Id
|
---|
21 | @Column(
|
---|
22 | name = "id",
|
---|
23 | nullable = false,
|
---|
24 | updatable = false
|
---|
25 | )
|
---|
26 | private Long id;
|
---|
27 |
|
---|
28 | private String token;
|
---|
29 |
|
---|
30 | @OneToOne
|
---|
31 | @JoinColumn(
|
---|
32 | nullable = false,
|
---|
33 | name = "app_user_id"
|
---|
34 | )
|
---|
35 | private AppUser user;
|
---|
36 |
|
---|
37 | public ConfirmationToken() {
|
---|
38 | }
|
---|
39 |
|
---|
40 | public ConfirmationToken(String token, AppUser user) {
|
---|
41 | this.token = token;
|
---|
42 | this.user = user;
|
---|
43 | }
|
---|
44 |
|
---|
45 | public Long getId() {
|
---|
46 | return id;
|
---|
47 | }
|
---|
48 |
|
---|
49 | public void setId(Long id) {
|
---|
50 | this.id = id;
|
---|
51 | }
|
---|
52 |
|
---|
53 | public String getToken() {
|
---|
54 | return token;
|
---|
55 | }
|
---|
56 |
|
---|
57 | public void setToken(String token) {
|
---|
58 | this.token = token;
|
---|
59 | }
|
---|
60 |
|
---|
61 | public AppUser getUser() {
|
---|
62 | return user;
|
---|
63 | }
|
---|
64 |
|
---|
65 | public void setUser(AppUser user) {
|
---|
66 | this.user = user;
|
---|
67 | }
|
---|
68 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.