Skip to content

Commit

Permalink
feat: add created_at and updated_at timestamps to User entity
Browse files Browse the repository at this point in the history
- Added `created_at` and `updated_at` fields to the `User` entity.
- Used `@CreationTimestamp` and `@UpdateTimestamp` annotations for automatic timestamp management.
- Created migration script to add the new columns to the `users` table in the database.
  • Loading branch information
LeonardoMeireles55 committed Jan 20, 2025
1 parent 27d1297 commit ce460a6
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.util.UriComponentsBuilder;

@SecurityRequirement(name = "bearer-key")
@RequestMapping("/users")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public record SignUpUsersRecord(
String email,

@NotNull @Pattern(
regexp = "^(?=.*[!@#$%^&*()_+\\-=\\[\\]{};':\"\\|,.<>\\/?])(?=.*\\d{4,}).+$",
regexp = "^(?=.*[!@#$%^&*()_+\\-=\\[\\]{};':\",.<>/?])(?=.*\\d{4,}).+$",
message = "Password must contain at least 4 characters and one special character.")
String password,
@NotNull String username
Expand Down

0 comments on commit ce460a6

Please sign in to comment.