Flask_restful add field problem

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

Mar.29,2021

if you use flask-sqlalchemy to manipulate the database, it is difficult to implement your method, but it also uses methods.

you can take a look at my article

Previous: C-sharp Security prompts that ProtectedData does not exist in the context.

Next: How java merges the results of multiple queried list collections into one list collection.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b369ab-405b4.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b369ab-405b4.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?