コード例 #1
0
class PicturePic(ModelBase, db.Model):
    """美食图片保存"""
    __tablename__ = 'picturepic'
    id = db.Column(db.Integer, primary_key=True, autoincrement=True)
    pic_url = db.Column(db.String(50), nullable=True)
    picture_id = db.Column(db.String(32),
                           db.ForeignKey("picture.id", ondelete='CASCADE'))
コード例 #2
0
class PictureContent(ModelBase, db.Model):
    """美食详细信息"""
    __tablename__ = "picturecontent"
    id = db.Column(db.Integer, autoincrement=True, primary_key=True)
    content = db.Column(db.Text, nullable=True)
    picture_id = db.Column(db.String(32),
                           db.ForeignKey("picture.id", ondelete='CASCADE'))
コード例 #3
0
class PictureLove(ModelBase, db.Model):
    """点击关注"""
    __tablename__ = "picturelove"
    id = db.Column(db.Integer, autoincrement=True, primary_key=True)
    remote_addr = db.Column(db.String(32), nullable=True)
    picture_time = db.Column(db.Date, nullable=True)
    remote_area = db.Column(db.String(32), nullable=True)
    picture_id = db.Column(db.String(32),
                           db.ForeignKey("picture.id", ondelete='CASCADE'))
コード例 #4
0
class FoodComment(ModelBase, db.Model):
    """评论"""
    __tablename__ = "foodcomment"
    id = db.Column(db.Integer, autoincrement=True, primary_key=True)
    remote_addr = db.Column(db.String(32), nullable=True)
    comment_content = db.Column(db.String(500), nullable=True)
    comment_time = db.Column(db.Date, nullable=True)
    qq = db.Column(db.String(30), nullable=True)
    qqname = db.Column(db.String(50), nullable=True)
    food_id = db.Column(db.String(32),
                        db.ForeignKey("food.id", ondelete='CASCADE'))