I'm implementing my CBT, about photos and such .. But now I got a doubt in the time to create the tables ... I'm using Laravel okay?
Next, I have the following tables:
users - roles - photos - tags
works as follows: There are functions of: 1) Photographer 2) Client (who would be the client of the photographer)
That is, a photographer will have multiple clients.
In table photos, I had thought of the columns:
| photos |
| id |
| path |
| imageable_id |
| imageable_type|
The imageable_type because for example, the photographer will have the profile image of him, the client also, the photographer may have company image, and when there was a photographic essay, there will be several photos linking the photographer to the client. But in that case would it be missing a column to link the photographer to the client?
For tags
| tags |
| id |
| description |
| taggable_id |
| taggable_type |
This one I think is easier because the type, or it will be a tag for the photo or it will be a tag for an essay, just that ...
But with regard to photos themselves, what kind of relationship is it? Polymorphic ManyToMany ??
I hope you have explained it successfully, thank you!