refactor(backend): 统一返回的数据格式

This commit is contained in:
zhengxinonly
2025-07-08 22:16:12 +08:00
parent 65e41ac9f1
commit fa69175e65
18 changed files with 212 additions and 113 deletions
+1 -10
View File
@@ -13,18 +13,9 @@ class RoleORM(BaseORM):
rights_ids = db.Column(
db.String(512),
comment="权限ids,1,2,5。冗余字段,用户缓存用户权限",
comment="权限 ids,1,2,5。冗余字段,用户缓存用户权限",
)
rights_list = db.relationship(
"RightsORM", secondary="ums_role_rights", backref=db.backref("role")
)
def json(self):
return {
"id": self.id,
"name": self.name,
"code": self.code,
"desc": self.desc,
"rights_ids": self.rights_ids,
}