File tree Expand file tree Collapse file tree 3 files changed +7
-5
lines changed
board/adapter/driven/persistence/entity Expand file tree Collapse file tree 3 files changed +7
-5
lines changed Original file line number Diff line number Diff line change 17
17
@ DynamicUpdate
18
18
@ NoArgsConstructor (access = AccessLevel .PROTECTED )
19
19
@ Entity (name = "board" )
20
- public class BoardEntityLong extends LongBaseTimeEntity {
20
+ public class BoardEntity extends LongBaseTimeEntity {
21
21
private String title ;
22
22
23
23
private String content ;
@@ -26,7 +26,7 @@ public class BoardEntityLong extends LongBaseTimeEntity {
26
26
private BoardStatus status ;
27
27
28
28
@ Builder
29
- public BoardEntityLong (String title , String content , BoardStatus status ) {
29
+ public BoardEntity (String title , String content , BoardStatus status ) {
30
30
this .title = title ;
31
31
this .content = content ;
32
32
this .status = status ;
Original file line number Diff line number Diff line change 7
7
import org .springframework .data .annotation .LastModifiedDate ;
8
8
import org .springframework .data .jpa .domain .support .AuditingEntityListener ;
9
9
10
+ import java .io .Serializable ;
10
11
import java .time .Instant ;
11
12
12
13
@ Getter
13
14
@ MappedSuperclass
14
15
@ EntityListeners (AuditingEntityListener .class )
15
- public class BaseTimeEntity {
16
+ public abstract class BaseTimeEntity implements Serializable {
16
17
@ CreatedDate
17
18
private Instant createdAt ;
18
19
Original file line number Diff line number Diff line change 7
7
import lombok .Getter ;
8
8
9
9
import java .io .Serializable ;
10
+ import java .util .UUID ;
10
11
11
12
@ Getter
12
13
@ MappedSuperclass
13
14
public abstract class UuidBaseEntity implements Serializable {
14
15
@ Id
15
- @ GeneratedValue (strategy = GenerationType .IDENTITY )
16
- private Long id ;
16
+ @ GeneratedValue (strategy = GenerationType .UUID )
17
+ private UUID id ;
17
18
}
You can’t perform that action at this time.
0 commit comments