refactor(backend): 统一返回的数据格式
This commit is contained in:
@@ -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}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user