mt_metadata
mt_metadata copied to clipboard
Comments should have attributes
Currently comments are free form strings, but to be more explicit a there should be Comments class. It should be a list of Comment objects. A Comment would have attributes:
-
comment--> a string comment -
date--> date the comment was added -
author-->Personobject that has name and contact info
Comments()
{'comments':
[
{
'comment' : "this is a comment",
'date': "2020-01-01T12:00:00+00:00",
'author:
{
'name': "author name",
'email': "[email protected]",
'organization': "author organization",
},
{
'comment' : "this is a second comment",
'date': "2020-01-02T12:00:00+00:00",
'author:
{
'name': "author name",
'email': "[email protected]",
'organization': "author organization",
},
]
}