osuosl / iam

Invoicing and metrics project
Other
4 stars 0 forks source link

SKU - resource - project association #251

Closed Kennric closed 7 years ago

Kennric commented 7 years ago

Currently node and db resources have a many-to-one relation to projects (Project has many _resources). To associate a specific SKU with the specific Project-resource, we'll need an intermediate join table between project and and each resource type which stores the project_id, _resource_id and a sku_id.

When adding a resource to a project, the form must include a selector for all available SKUs to add a sku to the project/resource association.

Probably the best way to accomplish this with the Sequel ORM is to create a model for the join table (a ProjectNodeResource model, for instance) which itself has a many-to-many association with SKUs

alxngyn commented 7 years ago

Model // relation

Crud