/lottery

Primary LanguagePHPBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

CASEXE PHP test

The lottery app. User can get one of the following: money, loyalty points or one thing from predefined list. Money can be sent to user's bank account or converted to the loyalty points. The thing can be sent via regular mail. User can refuse his gift.

Installation

  1. Install Docker with docker-compose
  2. Clone this repo
  3. In terminal run
docker-compose run --rm backend composer install
docker-compose run --rm backend /app/init
  1. Run the migrations
docker-compose run --rm backend yii migrate
  1. Start container
docker-compose up -d
  1. Access in browser:

Roadmap

  • Install and configure Yii framework
  • Make migrations for User, Lottery, Gift and Thing models
  • Make CRUD for models
  • Make lottery front logic
  • Make console command for sending money in batch of N transactions
  • Make Unit-test for convertation from money to loyalty points
  • Cleanup