project -- private project------- \public project \ \ song -- private song -------- Shareable \_ public song
So, essentially, I have “abstract” classes (project, song) which exist in two variations: public and private. For instance project would define ED properties and methods that are the same for private and public projects. Then the private and public project classes inherit from project and define additional properties. This all worked fine so far, but now I need to add a second parent class Shareable. The Shareable base class would add methods and ED properties that are required to make a project or song shareable. This would be useful to implement a generic component that allows to share a private entity, by defining the input to be of type Shareable.
Long story short, my issue here is that js is not supporting multiple inheritance and I don’t see a way how I can make this work with single inheritance.
As for the backend, private project is a dedicated endpoint that requires authentication. public project is a dedicated endpoint that does not require authentication. And the result of sharing a private project is a public project.