Open jd-solanki opened 3 months ago
Hey, @jd-solanki, nice to know you like it!
Some of it is because of how FastCRUD evolved, it started inside of fastapi boilerplate, back when it was still a CRUDBase, and the idea of an internal update schema came from this:
class UserUpdateInternal(UserUpdate):
updated_at: datetime
Theoretically, if you passed an UpdateInternalType
, the updated_at
column should be modified.
The point of the DeleteSchema
is the same, but it kind of evolved from if passing a DeleteSchema to if has an is_deleted
attribute.
So basically, you may open a PR or discussion about removing this things and we can discuss it.
How's your plan for improving types for filtering because after reading docs it looks like FilterConfig is not type safe π€
About this, we are basically fixing things as they come (specially if they are more urgent). Since at the moment more is coming up than we can fix, not a lot of future planning going on.
You can always open PRs fixing stuff though, we'll be really happy
Describe the bug or question Hi ππ»
First of all great library. I wanted to create something like this and it already exist π
I already have similar approach in my previous project but as you also provide great filtering & sorting out of the box I would like to give it a try.
Question: I was migrating from my own CRUD to FastCRUD and realized there's two new schemas
UpdateSchemaInternalType
&DeleteSchemaType
. I wanted to know why those two exist?UpdateSchemaInternalType
: I searched the docs & also checked the source but schema isn't used anywher, Am I right? If yes, Should we remove it from passing it for static typing?DeleteSchemaType
: Most of the time this is not required and also in source code I can see it's just inheriting theBaseModel
so should we also remove it? Moreover, I'm not aware of whole code strcuture but I noticed there's conditional addition of delete endpoint based on this schema I guess.To Reproduce n/a
Description above
Screenshots n/a
Additional context How's your plan for improving types for filtering because after reading docs it looks like FilterConfig is not type safe π€