Models
Module contents
This package includes the application’s data models, such as ORM definitions or Pydantic schemas, used for database operations and data validation.
- class back_chat.models.ApiUser(*args, **kwargs)[source]
Bases:
Model
- DoesNotExist
alias of
ApiUserDoesNotExist
- city = <IntegerField: ApiUser.city>
- id = <AutoField: ApiUser.id>
- name = <CharField: ApiUser.name>
- postal_code = <CharField: ApiUser.postal_code>
- uid = <CharField: ApiUser.uid>
- class back_chat.models.Message(*args, **kwargs)[source]
Bases:
Model
- DoesNotExist
alias of
MessageDoesNotExist
- content = <TextField: Message.content>
- id = <AutoField: Message.id>
- timestamp = <DateTimeField: Message.timestamp>
- uid = <CharField: Message.uid>
- user_id = <CharField: Message.user_id>
- class back_chat.models.MessageSchema(*, user_id: str, content: str = '', timestamp: datetime = datetime.datetime(2025, 8, 5, 7, 53, 13, 368917), mtype: str = 'message', isMine: bool = False)[source]
Bases:
BaseModel
- content: str
- isMine: bool
- model_config: ClassVar[ConfigDict] = {'from_attributes': True, 'orm_mode': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- mtype: str
- timestamp: datetime
- user_id: str
- class back_chat.models.NotificationSchema(*, content: dict = {}, timestamp: datetime = datetime.datetime(2025, 8, 5, 7, 53, 13, 369636), type: str = 'message')[source]
Bases:
BaseModel
- content: dict
- model_config: ClassVar[ConfigDict] = {'from_attributes': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- timestamp: datetime
- type: str
- class back_chat.models.ShowUserSchema(*, id: str = 0, name: str = '', postal_code: str = '', city: str = '-')[source]
Bases:
BaseModel
- city: str
- id: str
- model_config: ClassVar[ConfigDict] = {'from_attributes': True, 'orm_mode': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- name: str
- postal_code: str
- class back_chat.models.UserConf(*args, **kwargs)[source]
Bases:
Model
- DoesNotExist
alias of
UserConfDoesNotExist
- id = <AutoField: UserConf.id>
- json = <CharField: UserConf.json>
- last_update = <DateTimeField: UserConf.last_update>
- uid = <CharField: UserConf.uid>
- user_id = <CharField: UserConf.user_id>
- user_name = <CharField: UserConf.user_name>
- class back_chat.models.UserConnection(*, name: str, status: str = 'online', lastConnection: datetime = datetime.datetime(2025, 8, 5, 7, 53, 13, 368482))[source]
Bases:
BaseModel
- lastConnection: datetime
- model_config: ClassVar[ConfigDict] = {'from_attributes': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- name: str
- status: str
- class back_chat.models.UserSchema(*, name: str = '', postal_code: str = '', city: str = '-')[source]
Bases:
BaseModel
- city: str
- model_config: ClassVar[ConfigDict] = {'from_attributes': True, 'orm_mode': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- name: str
- postal_code: str
Submodules
Orm module
- class back_chat.models.orm.ApiUser(*args, **kwargs)[source]
Bases:
Model
- DoesNotExist
alias of
ApiUserDoesNotExist
- city = <IntegerField: ApiUser.city>
- id = <AutoField: ApiUser.id>
- name = <CharField: ApiUser.name>
- postal_code = <CharField: ApiUser.postal_code>
- uid = <CharField: ApiUser.uid>
- class back_chat.models.orm.Message(*args, **kwargs)[source]
Bases:
Model
- DoesNotExist
alias of
MessageDoesNotExist
- content = <TextField: Message.content>
- id = <AutoField: Message.id>
- timestamp = <DateTimeField: Message.timestamp>
- uid = <CharField: Message.uid>
- user_id = <CharField: Message.user_id>
- class back_chat.models.orm.UserConf(*args, **kwargs)[source]
Bases:
Model
- DoesNotExist
alias of
UserConfDoesNotExist
- id = <AutoField: UserConf.id>
- json = <CharField: UserConf.json>
- last_update = <DateTimeField: UserConf.last_update>
- uid = <CharField: UserConf.uid>
- user_id = <CharField: UserConf.user_id>
- user_name = <CharField: UserConf.user_name>
Schemas module
- class back_chat.models.schemas.MessageSchema(*, user_id: str, content: str = '', timestamp: datetime = datetime.datetime(2025, 8, 5, 7, 53, 13, 368917), mtype: str = 'message', isMine: bool = False)[source]
Bases:
BaseModel
- content: str
- isMine: bool
- model_config: ClassVar[ConfigDict] = {'from_attributes': True, 'orm_mode': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- mtype: str
- timestamp: datetime
- user_id: str
- class back_chat.models.schemas.NotificationSchema(*, content: dict = {}, timestamp: datetime = datetime.datetime(2025, 8, 5, 7, 53, 13, 369636), type: str = 'message')[source]
Bases:
BaseModel
- content: dict
- model_config: ClassVar[ConfigDict] = {'from_attributes': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- timestamp: datetime
- type: str
- class back_chat.models.schemas.ShowUserSchema(*, id: str = 0, name: str = '', postal_code: str = '', city: str = '-')[source]
Bases:
BaseModel
- city: str
- id: str
- model_config: ClassVar[ConfigDict] = {'from_attributes': True, 'orm_mode': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- name: str
- postal_code: str
- class back_chat.models.schemas.UserConnection(*, name: str, status: str = 'online', lastConnection: datetime = datetime.datetime(2025, 8, 5, 7, 53, 13, 368482))[source]
Bases:
BaseModel
- lastConnection: datetime
- model_config: ClassVar[ConfigDict] = {'from_attributes': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- name: str
- status: str
- class back_chat.models.schemas.UserSchema(*, name: str = '', postal_code: str = '', city: str = '-')[source]
Bases:
BaseModel
- city: str
- model_config: ClassVar[ConfigDict] = {'from_attributes': True, 'orm_mode': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- name: str
- postal_code: str