summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md45
1 files changed, 45 insertions, 0 deletions
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....