Create Achievement Data Transfer Object & Command CreateAchievementCommand
Context/Description
To work with achievements from backend perspective, we need a Data Transfer Object which represents one achievement entity. To add achievements to database, we need a command (followed by Commands & Queries Separation NOT a symfony command) to run the sql queries.
Task
- Create a
AwardedAchievement
Data Transfer Object - Create a
CreateAchievementCommand
which inserts a new achievement into databasemethods inAchievementGateway
to allow working with these DTOs.
Acceptance criteria
- both have
declare(strict_types=1);
-
Achievement
DTO is stored here:src/Modules/Achievement/DTO
-
CreateAchievementCommand
is stored here:src/Modules/Achievement/Command
-
CreateAchievementCommand
has only one method with the following signature:execute(Achievement $achievement): void
-
CreateAchievementCommand
has integration test with 100% testing coverage
Proposal (optional to fill in)
- work with test-driven-developmentAll new methods are tested
Links / references (optional to fill in)
Edited by Anton Ballmaier