feat: added seseion for sqlite, alembic and ruff, model Timerr, schemas.py, mixin for id, cruds: create timer, get timer, settings.py for db
This commit is contained in:
13
kawai_focus/database/mixins.py
Normal file
13
kawai_focus/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