kamihi.users.models
⚓︎
Database models for the users module.
License
MIT
Modules:
| Name | Description |
|---|---|
permission |
Permission model for actions. |
role |
Role model (the one I never had...). |
user |
User model. |
Classes:
| Name | Description |
|---|---|
Permission |
Permission model for actions. |
Role |
Role model. |
User |
Placeholder for the User model. |
Permission
⚓︎
Bases: Document
Permission model for actions.
Role
⚓︎
Bases: Document
Role model.
This model represents a role in the system. It is used to manage user permissions and access levels.
Attributes:
| Name | Type | Description |
|---|---|---|
name |
str
|
The name of the role. |
User
⚓︎
Bases: Document
Placeholder for the User model.
Methods:
| Name | Description |
|---|---|
get_model |
Get the model class for the User. |
set_model |
Set the model class for the User. |
get_model
classmethod
⚓︎
get_model() -> type[User]
Get the model class for the User.
Returns:
| Name | Type | Description |
|---|---|---|
type |
type[User]
|
The model class for the User. |
Source code in src/kamihi/users/models/user.py
23 24 25 26 27 28 29 30 31 32 | |
set_model
classmethod
⚓︎
set_model(model: type[User]) -> None
Set the model class for the User.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
type
|
The model class to set. |
required |
Source code in src/kamihi/users/models/user.py
34 35 36 37 38 39 40 41 42 43 | |