diff --git a/ayct_backend/campaign/models.py b/ayct_backend/campaign/models.py index 8664272..a29447b 100644 --- a/ayct_backend/campaign/models.py +++ b/ayct_backend/campaign/models.py @@ -2,6 +2,7 @@ from flask_sqlalchemy import SQLAlchemy campaign_db = SQLAlchemy() -class TwitterAccount(campaign_db.Model): - # fields here - pass \ No newline at end of file +class TwitterCampaign(campaign_db.Model): + __tablename__ = 'twitter_campaign' + + campaign_id = campaign_db.Column(campaign_db.Integer, primary_key=True, nullable=False) diff --git a/ayct_backend/twitter/models.py b/ayct_backend/twitter/models.py index 8650611..677088f 100644 --- a/ayct_backend/twitter/models.py +++ b/ayct_backend/twitter/models.py @@ -6,7 +6,7 @@ twitter_db = SQLAlchemy() class TwitterAccount(twitter_db.Model): __tablename__ = 'twitter_account' - account_id = twitter_db.Column(twitter_db.Integer, primary_key=True) + account_id = twitter_db.Column(twitter_db.Integer, primary_key=True, nullable=False) twitter_user_id = twitter_db.Column(twitter_db.String(16), unique=True, nullable=False) username = twitter_db.Column(twitter_db.String(16), unique=True, nullable=False) access_token = twitter_db.Column(twitter_db.String(256), nullable=False)