diff options
| -rw-r--r-- | README.md | 45 |
1 files changed, 45 insertions, 0 deletions
@@ -56,3 +56,48 @@ A typical well license has the following structure (all fields are required): 2. Your submission can be developed using any technology/language you like. 3. This private Github repo has been created just for you. Please push your code to it for review. + +## Design (Rough) + +### Assumptions + +* Name of applicant is the name of the employee at the company that submitted the application. +* Date of license is the date the license was issued. +* Assume perf isn't the focus, so no need to over-engineer with a denorm read model. + +### Model + +WellLicense (aggregate root) +* belongs_to applicant +* has_one well_type +* has_one location +* issued_at +* expired_at +* status + +WellType (flyweight value object) +* id +* name + +Applicant +* company + +Location (value object) +* latitude +* longitude +* township_name + +LicenseStatus (flyweight, state) +* id + +### Endpoints + +* GET /licenses - list of all well licenses +* GET /company/:id/licenses - list of all active licences for company +* GET /licenses/:id - details of a single license +* GET /company/:id/licenses?township=:township - list of active licenses for township, for company. + +Start with a versioned api using urls cuz it's easy peasy. Won't worry +about token auth at this point. + +What should i call this thing? hrmm.... |
