模型创建 1导入SQLAlchemy from flask_sqlalchemy import SQLAlchemy 2生成数据库访问对象db db = SQLAlchemy 3定义表对象 class Comment(db.Model): __tablename__ = "comment" id = db.Column(db.Integer, primary_key=True) # 编号 content = db.Column(db.Text) # 评论内容 movie_id = db.Column(db.Integer, db.ForeignKey('mo