pbr-ayct-backend/ayct_backend/campaign/models.py
2022-01-31 18:29:20 +01:00

15 lines
718 B
Python

from flask_sqlalchemy import SQLAlchemy
campaign_db = SQLAlchemy()
class TwitterCampaign(campaign_db.Model):
__tablename__ = 'twitter_campaign'
campaign_id = campaign_db.Column(campaign_db.Integer, primary_key=True)
user_id = campaign_db.Column(campaign_db.String(64), nullable=False)
campaign_name = campaign_db.Column(campaign_db.String(64), nullable=False)
twitter_account_id = campaign_db.Column(campaign_db.String(32), nullable=False)
user_input = campaign_db.Column(campaign_db.String(100), nullable=False)
generated_content = campaign_db.Column(campaign_db.String(300), nullable=False)
twitter_post_id = campaign_db.Column(campaign_db.String(32), unique=True, nullable=False)