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
-14
View File
@@ -30,20 +30,6 @@ class RightsORM(BaseORM):
) # 自关联
children = db.relationship("RightsORM", back_populates="parent")
def json(self):
return {
"id": self.id,
"name": self.name,
"code": self.code,
"type": self.type,
"url": self.url,
"icon_sign": self.icon_sign,
"status": self.status,
"sort": self.sort,
"open_type": self.open_type,
"pid": self.pid,
}
def menu_json(self):
type_map_dict = {"menu": 0, "path": 1}