refactor: moving more models to mapped_column
This commit is contained in:
parent
ea020d6edd
commit
75b2c1adf0
9 changed files with 272 additions and 94 deletions
|
@ -13,10 +13,10 @@ class AbstractConfiguration(db.Model): # type: ignore
|
|||
__abstract__ = True
|
||||
|
||||
id: Mapped[int] = mapped_column(db.Integer, primary_key=True)
|
||||
description: Mapped[str] = mapped_column(db.String(255), nullable=False)
|
||||
added: Mapped[datetime] = mapped_column(db.DateTime(), default=datetime.utcnow, nullable=False)
|
||||
updated: Mapped[datetime] = mapped_column(db.DateTime(), default=datetime.utcnow, nullable=False)
|
||||
destroyed: Mapped[datetime] = mapped_column(db.DateTime())
|
||||
description: Mapped[str]
|
||||
added: Mapped[datetime]
|
||||
updated: Mapped[datetime]
|
||||
destroyed: Mapped[Optional[datetime]]
|
||||
|
||||
@property
|
||||
@abstractmethod
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue