Create Subject model and Categorization relation
We need to assign Subject to Resources, but via an Intermediary entity so we can track attributes about the assignment.
Subject [id, name] -> Categorization [subject_id, resource_id, institution_type] -> Resource [id, code, ...]
As above, Subject and Resource are related via a has_many through: Categorization
relation.
The subject will have only an id
and name
field, like the Format. The categorization will have the usual join table fields, but also another field for the "view type", or as I see it, the type of institution (k12, academic, etc.) for which the categorization is appropriate.
I don't yet know how that institution_type
value will be defined, but I'm pretty confident we'll need it.
Edited by Mike Kanning