pbr-ayct-backend/ayct_backend/campaign/models.py

14 lines
658 B
Python
Raw Normal View History

2022-01-24 19:37:27 +01:00
from flask_sqlalchemy import SQLAlchemy
campaign_db = SQLAlchemy()
2022-01-24 21:04:19 +01:00
class TwitterCampaign(campaign_db.Model):
__tablename__ = 'twitter_campaign'
2022-01-24 21:17:01 +01:00
campaign_id = campaign_db.Column(campaign_db.Integer, primary_key=True)
2022-01-24 23:20:49 +01:00
campaign_name = campaign_db.Column(campaign_db.String(64), nullable=False)
twitter_account_id = campaign_db.Column(campaign_db.String(32), unique=True, 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)