codeforboston / police-data-trust

A national archive of police data collected by journalists, lawyers, and activists around the country.
https://www.nationalpolicedata.org
MIT License
47 stars 81 forks source link

[FEATURE] Convert the Unit property into a DB Model #387

Closed DMalone87 closed 5 months ago

DMalone87 commented 6 months ago

Is your feature request related to a problem? Please describe. Each police officer working within a police department will be associated with a particular unit. For example, NYPD Officer Kit Yung is a Sergeant in the 9th Precinct.

In our current database structure, a Unit is just a string property of the employment model (See here). In this model, a unit exists between a single officer and a single agency. This doesn't properly represent a world where many officers can belong to the same Unit.

Describe the solution you'd like We should add a Unit model as a child of an Agency. We can then associate the Unit object with the Employment object, properly representing the relationship.