there is a field in the QaAnswer table in this table. When json returns, I want to add a field to QaAnswer. I don"t know how to add it
.
class QaAnswer(db.Model):
__tablename__ = "qa_answer"
id = db.Column(db.Integer, primary_key=True)
a_questionid = db.Column(db.Integer, nullable=False)
a_answerid = db.Column(db.Integer)
a_respondcontent = db.Column(db.String(255), nullable=False)
a_createtime = db.Column(db.DateTime, nullable=False)
a_likecount = db.Column(db.Integer)
a_isshow = db.Column(db.Integer)
a_userid = db.Column(db.Integer, nullable=False)
I want to return the json of the following style
"anwserid": 3,
"respondcontent": "11111",
"content": "",
"createtime": "2018-07-20 12:03:07",
"likecount": "0",
"userid": 9449
add a field, do not know how to operate