from flask_sqlalchemy import SQLAlchemy
import datetime
from app import app

db = SQLAlchemy(app)

class Posts(db.Model):
    pid = db.Column(db.Integer, primary_key=True, autoincrement=True)
    title = db.Column(db.String(100))
    writingfield = db.Column(db.String(10000))
    category = db.Column(db.String(100))

    def __init__(self, title, writingfield, category):
        self.title = title
        self.writingfield = writingfield
        self.category = category


db.create_all()
