Olaoluwa Oke| 14 June 2023
I think I must’ve skipped over the User entity in my earlier notes. That’s probably because I wrote it on Day One — fast. Mostly because I had already written something nearly identical for my bookmarking app, Tabitha.The style carried over nicely. And with the ERD already sketched out, this really wasn’t uncharted territory.
id
firstName
email
password
roomid
role
joinedAt
isActive
findByEmailIgnoreCase
findByRoomId
(We’ll come back to why later.) encode(rawPassword)
matches(rawInput, hashedPassword)
Create user
Deactivate user (isActive attribute)
Update User
GetUsersInARoom
JoinARoom
- made sure you can only join a room once