You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to kindly propose that we would start a collab on rewriting this whole package.
I am sure that you have learned a lot of things during the creation of Pinia ORM, so I would like to ask you if you would be interested in rewriting everything for v2.0.
The aspects of the package that I would like to focus on are:
Better Model API:
Typing a Partial type for Element taking into account the field declaration for the current Model instance. For example, let's say we have a Post model that has the following fields: @Uid field and a @Str(null) declare title: string | null. My proposed/theoretical RequiredModelAttributes<TModel extends Model> would see which fields can be null (in this case it would be the title field) and return a type that has all the required fields. This type could be used when using the Repository.save method (i.e. Repository.save<TModel extends Model>(model: RequiredModelAttributes<TModel>).
Implement library interface overloads for globally declaring what entities the app has (e.g. module redeclaration/overloading with an Entities interface).
Let me know what you think, sir. I'm confident this could revolutionize the way people create Vue apps.
Thank you for your consideration!
All the best,
Alfa
Additional information
Would you be willing to help implement this feature?
Describe the feature
Dear Mr Becker,
I would like to kindly propose that we would start a collab on rewriting this whole package.
I am sure that you have learned a lot of things during the creation of Pinia ORM, so I would like to ask you if you would be interested in rewriting everything for v2.0.
The aspects of the package that I would like to focus on are:
Typing a
Partialtype forElementtaking into account the field declaration for the currentModelinstance. For example, let's say we have aPostmodel that has the following fields:@Uidfield and a@Str(null) declare title: string | null. My proposed/theoreticalRequiredModelAttributes<TModel extends Model>would see which fields can benull(in this case it would be thetitlefield) and return a type that has all the required fields. This type could be used when using theRepository.savemethod (i.e.Repository.save<TModel extends Model>(model: RequiredModelAttributes<TModel>).Entitiesinterface).Let me know what you think, sir. I'm confident this could revolutionize the way people create Vue apps.
Thank you for your consideration!
All the best,
Alfa
Additional information
Final checks