Files
kawai-focus/kawai_focus/database/mixins.py

14 lines
296 B
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
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
)