Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed .gradle/8.14.3/checksums/checksums.lock
Binary file not shown.
Binary file removed .gradle/8.14.3/executionHistory/executionHistory.lock
Binary file not shown.
Binary file removed .gradle/8.14.3/fileChanges/last-build.bin
Binary file not shown.
Binary file removed .gradle/8.14.3/fileHashes/fileHashes.lock
Binary file not shown.
Empty file removed .gradle/8.14.3/gc.properties
Empty file.
Binary file removed .gradle/buildOutputCleanup/buildOutputCleanup.lock
Binary file not shown.
2 changes: 0 additions & 2 deletions .gradle/buildOutputCleanup/cache.properties

This file was deleted.

Empty file removed .gradle/vcs-1/gc.properties
Empty file.
Empty file modified gradlew
100644 → 100755
Empty file.
18 changes: 16 additions & 2 deletions src/main/java/com/issueDive/entity/Comment.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import java.util.List;

@Entity
@Table(name = "comments")
@Table(name = "comment")
@Getter
@Setter
@NoArgsConstructor(access = AccessLevel.PROTECTED)
Expand All @@ -25,7 +25,7 @@ public class Comment {
private Issue issue;

@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "user_id", nullable = false)
@JoinColumn(name = "author_id", nullable = false)
private User user;

@Lob
Expand All @@ -49,4 +49,18 @@ public class Comment {
private LocalDateTime updatedAt;

public void changeDescription(String description) { this.description = description; }


@PrePersist
public void prePersist() {
LocalDateTime now = LocalDateTime.now();
this.createdAt = now;
this.updatedAt = now;
}

@PreUpdate
public void preUpdate() {
this.updatedAt = LocalDateTime.now();
}

}
17 changes: 0 additions & 17 deletions src/main/resources/application.properties

This file was deleted.

14 changes: 0 additions & 14 deletions src/test/resources/application-test.properties

This file was deleted.