File tree Expand file tree Collapse file tree 6 files changed +38
-4
lines changed Expand file tree Collapse file tree 6 files changed +38
-4
lines changed Original file line number Diff line number Diff line change 1
1
package com .BlogApp .module ;
2
2
3
+ import java .time .LocalDate ;
4
+
3
5
import javax .persistence .Entity ;
4
6
import javax .persistence .GeneratedValue ;
5
7
import javax .persistence .GenerationType ;
@@ -23,6 +25,12 @@ public class Comments {
23
25
@ GeneratedValue (strategy = GenerationType .AUTO )
24
26
private Integer commentId ;
25
27
private String commentBody ;
28
+ @ JsonIgnore
29
+ private LocalDate dateCreated ;
30
+ // timestamp edit
31
+ @ JsonIgnore
32
+ private LocalDate dateModified ;
33
+
26
34
27
35
@ JsonIgnore
28
36
@ ManyToOne
Original file line number Diff line number Diff line change 1
1
package com .BlogApp .module ;
2
2
3
+ import java .time .LocalDate ;
4
+
3
5
import javax .persistence .Entity ;
4
6
import javax .persistence .GeneratedValue ;
5
7
import javax .persistence .GenerationType ;
6
8
import javax .persistence .Id ;
7
9
import javax .persistence .JoinColumn ;
8
10
import javax .persistence .ManyToOne ;
9
11
12
+ import com .fasterxml .jackson .annotation .JsonIgnore ;
13
+
10
14
import lombok .AllArgsConstructor ;
11
15
import lombok .Data ;
12
16
import lombok .NoArgsConstructor ;
@@ -19,6 +23,12 @@ public class Connection {
19
23
@ GeneratedValue (strategy = GenerationType .AUTO )
20
24
private Integer followerId ;
21
25
26
+ @ JsonIgnore
27
+ private LocalDate dateFollowed ;
28
+ // timestamp edit
29
+ @ JsonIgnore
30
+ private LocalDate dateUnfollowed ;
31
+
22
32
@ ManyToOne
23
33
@ JoinColumn (name = "user_id" , referencedColumnName = "userId" )
24
34
private User follower ;
Original file line number Diff line number Diff line change @@ -24,5 +24,5 @@ public class CurrentSession {
24
24
25
25
private String uuid ;
26
26
27
- private LocalDateTime localDateTime ;
27
+ private LocalDateTime loginTime ;
28
28
}
Original file line number Diff line number Diff line change 1
1
package com .BlogApp .module ;
2
2
3
+ import java .time .LocalDate ;
3
4
import java .util .List ;
4
5
5
6
import javax .persistence .CascadeType ;
@@ -28,8 +29,11 @@ public class Post {
28
29
private Integer postId ;
29
30
private String postHeading ;
30
31
private String postBody ;
31
- // timestamp create
32
+ @ JsonIgnore
33
+ private LocalDate dateCreated ;
32
34
// timestamp edit
35
+ @ JsonIgnore
36
+ private LocalDate dateModified ;
33
37
34
38
@ JsonIgnore
35
39
@ ManyToOne
Original file line number Diff line number Diff line change 1
1
package com .BlogApp .module ;
2
2
3
+ import java .time .LocalDate ;
3
4
import java .util .List ;
4
5
5
6
import javax .persistence .CascadeType ;
@@ -49,7 +50,13 @@ public class User {
49
50
// private LocalDate dateOfBirth;
50
51
51
52
// timestamp create
53
+ @ JsonIgnore
54
+ private LocalDate dateCreated ;
52
55
// timestamp edit
56
+ @ JsonIgnore
57
+ private LocalDate dateModified ;
58
+
59
+
53
60
@ Email (message = "Please enter a valid email" )
54
61
@ NotBlank (message = "Email filed can't be empty" )
55
62
private String email ;
Original file line number Diff line number Diff line change
1
+
2
+
3
+ # MySql username and Password
4
+ spring.datasource.username =root
5
+ spring.datasource.password =root
6
+
1
7
# changing the server port
2
8
server.port =8080
3
9
10
+
4
11
# db specific properties
5
12
# change the MySQL username and Password
6
13
spring.datasource.url =jdbc:mysql://localhost:3306/blogApp
7
14
spring.datasource.driver-class-name =com.mysql.cj.jdbc.Driver
8
- spring.datasource.username =root
9
- spring.datasource.password =root
10
15
11
16
# ORM s/w specific properties
12
17
spring.jpa.hibernate.ddl-auto =update
You can’t perform that action at this time.
0 commit comments