feat: diet schema add fields 2
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
82258e8386
commit
7f21fac864
|
@ -7,6 +7,19 @@ class DietRecordsIn(Schema):
|
|||
current_date = fields.String()
|
||||
|
||||
|
||||
class heartOut(Schema):
|
||||
nickname = fields.String()
|
||||
avatar_url = fields.String()
|
||||
create_time = fields.String()
|
||||
|
||||
|
||||
class CommentOut(Schema):
|
||||
nickname = fields.String()
|
||||
avatar_url = fields.String()
|
||||
comment = fields.String()
|
||||
create_time = fields.String()
|
||||
|
||||
|
||||
class DietRecordOut(Schema):
|
||||
diet_id = fields.String(attribute='_id')
|
||||
category = fields.String()
|
||||
|
@ -14,6 +27,8 @@ class DietRecordOut(Schema):
|
|||
diet_image_url = fields.URL()
|
||||
heart_count = fields.Integer()
|
||||
comment_count = fields.Integer()
|
||||
hearts = fields.List(fields.Nested(heartOut))
|
||||
comments = fields.List(fields.Nested(CommentOut))
|
||||
create_time = fields.String()
|
||||
update_time = fields.String(allow_none=True)
|
||||
|
||||
|
|
Loading…
Reference in New Issue