refactor(api):移除marshal序列化

This commit is contained in:
zhengxinonly
2021-12-07 20:24:07 +08:00
parent 9490ccb7c0
commit 820ab9f5c6
13 changed files with 282 additions and 172 deletions
-14
View File
@@ -15,17 +15,3 @@ class RightsRole(db.Model, BaseModel):
sort = db.Column(db.Integer, comment='排序')
power = db.relationship('RightsPower', secondary="rt_role_power", backref=db.backref('role'))
@staticmethod
def fields():
return {
'id': fields.Integer,
'roleName': fields.String(attribute="name"),
'roleCode': fields.String(attribute="code"),
'enable': fields.Boolean,
'comment': fields.String,
'details': fields.String,
'sort': fields.Integer,
'create_at': fields.DateTime,
'update_at': fields.DateTime,
}