Setting
This module contains a basic Setting Model
- class loglan_core.setting.BaseSetting(date, db_version, last_word_id, db_release)[source]
Bases:
BaseModelBase Setting’s DB Model
Describes a table structure for storing dictionary settings.
<details><summary>Show Examples</summary><p>
`python {'id': 1, 'last_word_id': 10141, 'date': datetime.datetime(2020, 10, 25, 5, 10, 20), 'db_release': '4.5.9', 'db_version': 2} `</p></details>- created: Mapped[datetime]
A class attribute mapped to a column in the database table. It represents the timestamp when a row is created. The default value is the current timestamp, and it can’t be null.
- Type:
datetime
-
date:
Mapped[datetime] Last modified date dateime.datetime : nullable=False, unique=True
-
db_release:
Mapped[Annotated[str]] Database release (for new application) str : max_length=16, nullable=False, unique=True
-
db_version:
Mapped[int] Database version (for old application) int : nullable=False, unique=False
- id: Mapped[int]
A class attribute mapped to a column in the database table. It serves as the primary key for the table.
- Type:
int
-
last_word_id:
Mapped[int] ID number of the last word in DB int : nullable=False, unique=False
- updated: Mapped[datetime | None]
A class attribute mapped to a column in the database table. It represents the timestamp when a row is last updated. Whenever the row is updated, this timestamp is automatically set to the current time. It can be
nullif the row has never been updated.- Type:
datetime