Last change
on this file since 950fa0d was 950fa0d, checked in by Gjoko Kostadinov <gjoko.kostadinov@…>, 14 months ago |
Periodic update
|
-
Property mode
set to
100644
|
File size:
1.3 KB
|
Rev | Line | |
---|
[cf9cdbf] | 1 | package edu.gjoko.schedlr.entity;
|
---|
| 2 |
|
---|
[8bcd64c] | 3 | import com.fasterxml.jackson.annotation.JsonIgnore;
|
---|
[cf9cdbf] | 4 | import lombok.AllArgsConstructor;
|
---|
| 5 | import lombok.Getter;
|
---|
| 6 | import lombok.NoArgsConstructor;
|
---|
| 7 | import lombok.Setter;
|
---|
[204464d] | 8 | import org.springframework.data.annotation.CreatedDate;
|
---|
| 9 | import org.springframework.data.annotation.LastModifiedDate;
|
---|
| 10 | import org.springframework.data.jpa.domain.support.AuditingEntityListener;
|
---|
[cf9cdbf] | 11 |
|
---|
| 12 | import javax.persistence.*;
|
---|
| 13 | import java.time.LocalDateTime;
|
---|
| 14 |
|
---|
| 15 | @Entity
|
---|
[204464d] | 16 | @EntityListeners(AuditingEntityListener.class)
|
---|
[cf9cdbf] | 17 | @Table(name = "stakeholder")
|
---|
| 18 | @Getter
|
---|
| 19 | @Setter
|
---|
| 20 | @NoArgsConstructor
|
---|
| 21 | @AllArgsConstructor
|
---|
| 22 | public class Stakeholder {
|
---|
| 23 |
|
---|
| 24 | @Id
|
---|
| 25 | @GeneratedValue(strategy = GenerationType.SEQUENCE)
|
---|
| 26 | private Long id;
|
---|
| 27 |
|
---|
| 28 | @Column(name = "stakeholder_type")
|
---|
| 29 | @Enumerated(EnumType.STRING)
|
---|
| 30 | private StakeholderType stakeholderType;
|
---|
| 31 |
|
---|
| 32 | @Column(name = "first_name")
|
---|
| 33 | private String firstName;
|
---|
| 34 |
|
---|
| 35 | @Column(name = "last_name")
|
---|
| 36 | private String lastName;
|
---|
| 37 |
|
---|
| 38 | @Column(name = "email")
|
---|
| 39 | private String email;
|
---|
| 40 |
|
---|
| 41 | @Column(name = "username")
|
---|
| 42 | private String username;
|
---|
| 43 |
|
---|
| 44 | @Column(name = "password")
|
---|
| 45 | private String password;
|
---|
| 46 |
|
---|
| 47 | @Column(name = "created")
|
---|
[204464d] | 48 | @CreatedDate
|
---|
[8bcd64c] | 49 | @JsonIgnore
|
---|
[cf9cdbf] | 50 | private LocalDateTime created;
|
---|
| 51 |
|
---|
| 52 | @Column(name = "modified")
|
---|
[204464d] | 53 | @LastModifiedDate
|
---|
[8bcd64c] | 54 | @JsonIgnore
|
---|
[cf9cdbf] | 55 | private LocalDateTime modified;
|
---|
| 56 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.