Skip to content

Conversation

@lquinoa252
Copy link
Contributor

SQL Queries - Database analysis queries for media counts, pages checked out, and guest records
Database Schema - Added library_users table with 5 sample users (bcrypt passwords)
JPA Entity - LibraryUserModel with proper field mapping and annotations
Repository Interface - LibraryUserRepository following Spring Data pattern
System Integration - Wired users into LibraryDataModel and LibraryDbDataLoader
Testing & Verification - All 44 tests pass, formatting compliant, full integration verified

- Create library_users table with id, email, first_name, last_name, password fields
- Add 5 sample users with bcrypt encoded passwords
- Table uses UUID for id and enforces email uniqueness
- Add LibraryUserModel following LibraryGuestModel pattern
- Map to library_users table with proper JPA annotations
- Include id, email, firstName, lastName, password fields
- Use @column annotations for snake_case database field mapping
- Add LibraryUserRepository following LibraryGuestRepository pattern
- Extends CrudRepository<LibraryUserModel, String>
- Override findAll() method to return List<LibraryUserModel>
- Enables Spring Data JPA integration for user data access
- Add users field to LibraryDataModel with getUsers() method
- Wire LibraryUserRepository into LibraryDbDataLoader
- Load users alongside media items and guests in loadData()
- Complete integration following existing patterns
- Apply Spotless code formatting to LibraryUserModel
- Verify application runs successfully with all 3 repositories
- Confirm all 44 tests pass without errors
- Validate SQL queries and database integration work correctly
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.

1 participant