项目基础模块代码

This commit is contained in:
2025-02-19 11:47:33 +08:00
parent 3cb2a4c507
commit 31302bcd17
30 changed files with 588 additions and 74 deletions

View File

@ -11,10 +11,6 @@ class DbCommon(Base):
create_time: Mapped[datetime.datetime] = mapped_column(default=datetime.datetime.utcnow())
update_time: Mapped[datetime.datetime] = mapped_column(default=datetime.datetime.utcnow(), onupdate=datetime.datetime.utcnow())
def keys(self):
return ["id", "create_time", "update_time"]
@declared_attr
def __tablename__(cls):
return cls.__name__.lower()