add migrations, create domain and crud layers

This commit is contained in:
2026-10-26 21:59:40 +03:00
parent 76b34fca4b
commit 3082b84f61
27 changed files with 481 additions and 278 deletions
+13
View File
@@ -0,0 +1,13 @@
from sqlalchemy import BigInteger, String
from sqlalchemy.orm import Mapped, mapped_column
from app.models.base import Base
class Counter(Base):
"""Именованный счётчик с атомарным обновлением."""
__tablename__ = "counters"
name: Mapped[str] = mapped_column(String(64), primary_key=True)
value: Mapped[int] = mapped_column(BigInteger)