pbr-ayct-backend/ayct_backend/twitter/models.py
2022-01-24 23:20:49 +01:00

14 lines
585 B
Python

from enum import unique
from flask_sqlalchemy import SQLAlchemy
twitter_db = SQLAlchemy()
class TwitterAccount(twitter_db.Model):
__tablename__ = 'twitter_account'
account_id = twitter_db.Column(twitter_db.Integer, primary_key=True)
twitter_account_id = twitter_db.Column(twitter_db.String(32), 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)
access_token_secret = twitter_db.Column(twitter_db.String(256), nullable=False)