A RESTful API built with Node.js, Express, and Sequelize ORM to manage football players.
It supports CRUD operations such as creating, retrieving, updating, and deleting players.
- Create a new player
- Retrieve all players with formatted wages (
£
) - Retrieve a single player by ID
- Update player details
- Delete player with confirmation message (includes deleted player name and ID)
- Deleting a player also deletes all related player stats
- Create new statistics for a player (goals, assists, yellow/red cards)
- Retrieve all player stats
- Retrieve stats for a single player (with player details)
- Update a player’s stats
- Delete a player’s stats (or delete both player and stats together with cascade delete)
id
(UUID / Auto Increment) – Primary keyplayerName
– Name of the playerwage
– Player wage- Other attributes (position, age, etc.)
id
(UUID / Auto Increment) – Primary keyplayerId
– Foreign key referencing Playergoals
– Number of goals scoredassists
– Number of assistsyellowCard
– Number of yellow cardsredCard
– Number of red cards
Associations:
- A
Player
has manyPlayerStats
- A
PlayerStat
belongs to aPlayer