ruff and prettier fixes
This commit is contained in:
@@ -6,6 +6,7 @@ from datetime import datetime
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from sqlalchemy.orm import DeclarativeBase
|
||||
|
||||
Base = DeclarativeBase
|
||||
else:
|
||||
from baby_monitor.repositories.dependencies.get_database import Base
|
||||
|
||||
@@ -11,6 +11,7 @@ from sqlalchemy.orm import Mapped, mapped_column
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from sqlalchemy.orm import DeclarativeBase
|
||||
|
||||
Base = DeclarativeBase
|
||||
else:
|
||||
from baby_monitor.repositories.dependencies.get_database import Base
|
||||
@@ -21,9 +22,7 @@ class Invitation(Base):
|
||||
|
||||
__tablename__ = "invitations"
|
||||
|
||||
id: Mapped[int] = mapped_column(
|
||||
Integer, primary_key=True, autoincrement=True
|
||||
)
|
||||
id: Mapped[int] = mapped_column(Integer, primary_key=True, autoincrement=True)
|
||||
token: Mapped[str] = mapped_column(String, unique=True, nullable=False)
|
||||
created_at: Mapped[datetime] = mapped_column(
|
||||
DateTime(timezone=True), nullable=False
|
||||
@@ -32,9 +31,7 @@ class Invitation(Base):
|
||||
DateTime(timezone=True), nullable=False
|
||||
)
|
||||
created_by_user_id: Mapped[int] = mapped_column(Integer, nullable=False)
|
||||
is_consumed: Mapped[bool] = mapped_column(
|
||||
Boolean, default=False, nullable=False
|
||||
)
|
||||
is_consumed: Mapped[bool] = mapped_column(Boolean, default=False, nullable=False)
|
||||
consumed_at: Mapped[datetime | None] = mapped_column(
|
||||
DateTime(timezone=True), nullable=True
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user