Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Databases support] Implement model generator #45

Open
1 task done
Tracked by #53
rszamszur opened this issue Feb 10, 2022 · 0 comments
Open
1 task done
Tracked by #53

[Databases support] Implement model generator #45

rszamszur opened this issue Feb 10, 2022 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@rszamszur
Copy link
Member

  • I have searched the issues of this repo and believe that this is not a duplicate.

Feature Request

Add base implementation for model generator (similar to Rails):
fastapi-mvc generate model Article title:str body:str

This would create:

  • a file article.py under package_name.app.models submodule
  • a unit test file
  • probably a DB migration?

Generated model should inherit from application model base class (also needs to be implemented), which for now won't do much, but in future can have methods for database CRUD, like in Rails you would have:

  • Article.new(...)
  • Article.update(..)
  • and so on

Or any other abstract logic implementations.

This will probably be based on tiangolo/sqlmodel

At least that's the idea. This issue would still require some further research and clarification.

@rszamszur rszamszur added the enhancement New feature or request label Feb 10, 2022
@rszamszur rszamszur added this to the Databases support milestone Apr 24, 2022
@rszamszur rszamszur changed the title Implement model generator [Databases support] Implement model generator Jun 15, 2022
@rszamszur rszamszur self-assigned this Jun 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant