Skip to content

Conversation

Copy link

Copilot AI commented Nov 11, 2025

Addresses all actionable review comments from the initial PR review.

Entity Lifecycle

  • Use @PrePersist to initialize createdAt at persistence time instead of instance creation
  • Add @Builder.Default to deleted field for proper builder pattern integration
@Column(name = "created_at", nullable = false)
private java.time.Instant createdAt;

@PrePersist
protected void onCreate() {
    this.createdAt = java.time.Instant.now();
}

Service Layer

  • Remove duplicate validation logic already handled by DTO @NotBlank annotations
  • Remove corresponding tests for null/empty/blank title (validation now at DTO boundary)

Code Quality

  • Fix spelling: 'enity' → 'entity', 'names' → 'named'
  • Remove accidental IDE error comments from BookService.java and BookRepository.java
  • Remove 105+ lines of commented-out test code
  • Remove Spring Boot config from openapi.yml (OpenAPI spec only)

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

…move redundant code

Co-authored-by: codesungrape <153101243+codesungrape@users.noreply.github.com>
Copilot AI changed the title [WIP] Establish foundational architecture for book API Address code review feedback: fix typos, entity lifecycle, and remove redundant code Nov 11, 2025
Copilot finished work on behalf of codesungrape November 11, 2025 19:24
Copilot AI requested a review from codesungrape November 11, 2025 19:24
Base automatically changed from Scaffold-core-data-structure-and-rules to main November 12, 2025 08:45
@codesungrape codesungrape deleted the copilot/sub-pr-1 branch November 17, 2025 17:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants