Invoice module with approve and reject system as a part of a bigger enterprise system. Approval module exists and you should use it.
Simple Invoice module which is approving or rejecting single invoice using information from existing approval module which tells if the given resource is approvable / rejectable. Only 3 endpoints are required:
- Show Invoice data, like in the list above
- Approve Invoice
- Reject Invoice
-
In this task you must save only invoices so don’t write repositories for every model/ entity.
-
You should be able to approve or reject each invoice just once (if invoice is approved you cannot reject it and vice versa.
-
You can assume that product quantity is integer and only currency is USD.
-
Proper seeder is located in Invoice module and it’s named DatabaseSeeder
-
In .env.example proper connection to database is established.
-
Using proper DDD structure is preferred (with elements like entity, value object, repository, mapper / proxy, DTO) but not mandatory. Unit tests in plus.
-
Docker is in docker catalog and you need only do
./start.sh
to make everything work
docker container is in docker folder. To connect with it just:
docker compose exec workspace bash