Skip to content

Commit

Permalink
Add LicenceDocumentRoleModel from document_roles
Browse files Browse the repository at this point in the history
https://eaflood.atlassian.net/browse/WATER-4292

> This is part of a series of changes to add the ability to identify the licence holder for a licence

This change adds the migration, model, test helper and unit tests for a new `LicenceDocumentRoleModel`.

We added [LicenceDocumentModel](#618). Though pointless, it's the only thing that points us to who the licence holder is. In the `crm_v2` schema it does this in `crm_v2.document_roles` which is the join table between `crm_v2.documents` and `crm_v2.roles`. `roles` is a lookup table of the 'role' a `crm_v2.contact` or `crm_c2.company` has, for example, licence holder! We added that as [LicenceRoleModel](#629).

We are now on the final step which is the adding the model that allows us to identify and extract the `crm_v2.document_roles` record that identifies _who_ is the current licence holder for a licence.
  • Loading branch information
Cruikshanks committed Jan 3, 2024
1 parent 2e4755e commit 1a0bbff
Showing 0 changed files with 0 additions and 0 deletions.

0 comments on commit 1a0bbff

Please sign in to comment.