mirror of
https://github.com/fastapiadmin/FastapiAdmin.git
synced 2026-09-21 04:46:26 +00:00
fix: 解决数据权限
fix: 优化页面显示
This commit is contained in:
@@ -32,17 +32,3 @@ class ConfigModel(ModelBase):
|
||||
description = Column(String(100), nullable=False, default="FastAPI Vue Admin 是完全开源的权限管理系统", comment="网站描述")
|
||||
created_at = Column(DateTime, default=datetime.now, comment='创建时间')
|
||||
updated_at = Column(DateTime, default=datetime.now, onupdate=datetime.now, comment='更新时间')
|
||||
creator_id = Column(
|
||||
Integer,
|
||||
ForeignKey("system_user.id", ondelete="SET NULL", onupdate="CASCADE"),
|
||||
nullable=True,
|
||||
index=True,
|
||||
comment="创建人ID"
|
||||
)
|
||||
creator = relationship(
|
||||
"UserModel",
|
||||
foreign_keys=creator_id,
|
||||
lazy="joined",
|
||||
post_update=True,
|
||||
uselist=False
|
||||
)
|
||||
@@ -40,4 +40,17 @@ class DeptModel(ModelBase):
|
||||
description = Column(Text, nullable=True, comment="备注说明")
|
||||
created_at = Column(DateTime, default=datetime.now, comment='创建时间')
|
||||
updated_at = Column(DateTime, default=datetime.now, onupdate=datetime.now, comment='更新时间')
|
||||
|
||||
creator_id = Column(
|
||||
Integer,
|
||||
ForeignKey("system_user.id", ondelete="SET NULL", onupdate="CASCADE"),
|
||||
nullable=True,
|
||||
index=True,
|
||||
comment="创建人ID"
|
||||
)
|
||||
creator = relationship(
|
||||
"UserModel",
|
||||
foreign_keys=creator_id,
|
||||
lazy="joined",
|
||||
post_update=True,
|
||||
uselist=False
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user