feat: wire native leaudit upload flow
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
"""BaseModel —— 所有业务模型的抽象基类。
|
||||
|
||||
自动提供三个公共时间字段:
|
||||
- create_time:INSERT 时由数据库写入当前时间
|
||||
- update_time:INSERT 和 UPDATE 时自动更新
|
||||
- delete_time:默认 NULL,非 NULL 表示已软删除
|
||||
- created_at:INSERT 时由数据库写入当前时间
|
||||
- updated_at:INSERT 和 UPDATE 时自动更新
|
||||
- deleted_at:默认 NULL,非 NULL 表示已软删除
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
@@ -21,12 +21,12 @@ class BaseModel(Base):
|
||||
|
||||
__abstract__ = True
|
||||
|
||||
create_time: Mapped[datetime] = mapped_column(
|
||||
DateTime(timezone=True), server_default=func.now(), comment="创建时间"
|
||||
created_at: Mapped[datetime] = mapped_column(
|
||||
"created_at", DateTime(timezone=True), server_default=func.now(), comment="创建时间"
|
||||
)
|
||||
update_time: Mapped[datetime] = mapped_column(
|
||||
DateTime(timezone=True), server_default=func.now(), onupdate=func.now(), comment="更新时间"
|
||||
updated_at: Mapped[datetime] = mapped_column(
|
||||
"updated_at", DateTime(timezone=True), server_default=func.now(), onupdate=func.now(), comment="更新时间"
|
||||
)
|
||||
delete_time: Mapped[datetime | None] = mapped_column(
|
||||
DateTime(timezone=True), default=None, comment="软删除时间"
|
||||
deleted_at: Mapped[datetime | None] = mapped_column(
|
||||
"deleted_at", DateTime(timezone=True), default=None, comment="软删除时间"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user