Buckets:
AnonymousSpottedToad/candidate_bucket / codebase /python /mdfarhankc_fastapi-fullauth /examples /tortoise_app /models.py
| from tortoise import fields | |
| from fastapi_fullauth.models.tortoise import ( | |
| RefreshTokenMixin, | |
| RoleMixin, | |
| UserMixin, | |
| ) | |
| class Role(RoleMixin): | |
| class Meta: | |
| table = "fullauth_roles" | |
| class RefreshToken(RefreshTokenMixin): | |
| class Meta: | |
| table = "fullauth_refresh_tokens" | |
| class User(UserMixin): | |
| display_name = fields.CharField(max_length=100, default="") | |
| phone = fields.CharField(max_length=20, default="") | |
| # Native Tortoise M2M; related_name="users" is what the adapter resolves | |
| # roles through. No separate user_role_model - Tortoise owns the table. | |
| roles = fields.ManyToManyField( | |
| "models.Role", related_name="users", through="fullauth_user_roles" | |
| ) | |
| class Meta: | |
| table = "fullauth_users" | |
Xet Storage Details
- Size:
- 770 Bytes
- Xet hash:
- c7936d906a7159db3a43e432081a881905df0cc73f3bf06e546a62e4f7c21f8b
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.