使用flask-restful实现数据校验与序列化
This commit is contained in:
@@ -37,15 +37,3 @@ class PowerSchema(ma.Schema):
|
||||
enable = fields.Integer()
|
||||
|
||||
|
||||
class PowerSchema2(ma.Schema): # 序列化类
|
||||
powerId = fields.Str(attribute="id")
|
||||
powerName = fields.Str(attribute="name")
|
||||
powerType = fields.Str(attribute="type")
|
||||
powerUrl = fields.Str(attribute="url")
|
||||
openType = fields.Str(attribute="open_type")
|
||||
parentId = fields.Str(attribute="parent_id")
|
||||
icon = fields.Str()
|
||||
sort = fields.Integer()
|
||||
create_time = fields.DateTime()
|
||||
update_time = fields.DateTime()
|
||||
enable = fields.Integer()
|
||||
|
||||
Reference in New Issue
Block a user