Starting at 9:00 18th Feb 2025
- As this is a company which based on the sale of homes lets set out the basic process of selling a home (the Project model)
- We will need a User model, [:first_name, :last_name, :email, :role] (eventually with association to itself, so the buyer has a solicitor etc.)
- Role will be a model with roles [sales_agent, buyer, seller, solicitor]
- Project has many Users, eg. all of the roles above with their associations (Agent has a buyer and a seller, buyer has a solicitor as does the seller)
- Comments is a model which belongs to a Project and a User. The user will be able to change the Project status
- The Project status will run as a state machine (prob aasm gem). Statuses will be [:for_sale, :offer_made, :offer_agreed, :completed, :cancelled]. Kepp it simple for the time being
- The Comment will represent when the state is changed. States will only be able to transition from certain other states, eg. you will not be able to transition from completed to for_sale
It's a dev containers project in rails 7. If you open in vscode and have docker desktop installed it should generate the dev environment, create the db's and seed some basic data
run rails db:seed
to make basic db
All tests are in RSPEC, and can be run by rspec