diff options
| author | mo khan <mokha@cisco.com> | 2014-02-20 17:51:14 -0700 |
|---|---|---|
| committer | mo khan <mokha@cisco.com> | 2014-02-20 17:54:40 -0700 |
| commit | e35076ac0eb14de0a6865043060f49f0f8cb1256 (patch) | |
| tree | 10b7610a83624aba41ba292ff5ab52f3043183a4 /README.md | |
| parent | 1fe046fd801be497f6176a1f882359ffcfaf6ce1 (diff) | |
sketch out a rough design.
Diffstat (limited to 'README.md')
| -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.... |
