Guest User

Untitled

a guest
Jul 16th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. from app import app, db # DB is your Flask-SQLAlchemy object
  2.  
  3. # By default this will correspond to a table named "ticket" in your db
  4. # You can override this, of course (see the docs) to point to any tablename
  5. class Ticket(db.Model):
  6. id = db.Column(db.Integer, primary_key=True)
  7. date = db.Column(db.DateTime, nullable=False)
  8. severity = db.Column(db.Integer, nullable=False, default=0)
  9. message = db.Column(db.String)
  10.  
  11. # No constructor needed, generally, unless you're doing something extra!
  12. # SQLAlchemy handles all that stuff for you
Add Comment
Please, Sign In to add comment