From e35076ac0eb14de0a6865043060f49f0f8cb1256 Mon Sep 17 00:00:00 2001 From: mo khan Date: Thu, 20 Feb 2014 17:51:14 -0700 Subject: sketch out a rough design. --- README.md | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) (limited to 'README.md') diff --git a/README.md b/README.md index a10a0e0..6b67063 100644 --- a/README.md +++ b/README.md @@ -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.... -- cgit v1.2.3