hasansezertasan / opinionated-mixins

Opinionated set of mixins. Implemented in Data Classes, Pydantic, SQLAlchemy, SQLModel, MongoEngine, ODMantic, Beanie, and WTForms.
MIT License
2 stars 0 forks source link

Model Proposal: User #3

Open hasansezertasan opened 4 months ago

hasansezertasan commented 4 months ago

Why do you need this model? What does it solve? Please describe. Almost every application requires a user model. It's the most copied/pasted, rethought, and restructured model that ever existed.

Describe the solution you'd like There are a lot of user authentication/authorization systems that are already used in thousands of projects. We can get inspired by looking at them.

Fields

Field Name Python Type Description Unique Required Index
username str Unique username. Yes Yes Yes
hashed_password str Hashed Password. No Yes No
email str Email Address of the user. Yes No Yes
date_email_verified datetime Date when email was verified. No No No
hasansezertasan commented 4 months ago

Checkout: