feat: added models, migrations, alembic, additional_dependencies; fix: fixed parametr for SettingsDB
This commit is contained in:
13
src/kawai_focus_v2/database/mixins.py
Normal file
13
src/kawai_focus_v2/database/mixins.py
Normal file
@@ -0,0 +1,13 @@
|
||||
from sqlalchemy.orm import Mapped, mapped_column
|
||||
from sqlalchemy import Integer
|
||||
|
||||
|
||||
class IDMixin:
|
||||
"""Базовый класс для моделей с id"""
|
||||
|
||||
id: Mapped[int] = mapped_column(
|
||||
Integer,
|
||||
name='id',
|
||||
primary_key=True,
|
||||
autoincrement=True
|
||||
)
|
||||
Reference in New Issue
Block a user