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
+3
View File
@@ -11,3 +11,6 @@ class BaseORM(db.Model):
def delete(self):
db.session.delete(self)
db.session.commit()
def json(self):
return {c.name: getattr(self, c.name) for c in self.__table__.columns}