You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

models.py 579B

3 yıl önce
3 yıl önce
123456789101112131415
  1. from flask_login import UserMixin
  2. from . import db
  3. from datetime import datetime
  4. class User(UserMixin, db.Model):
  5. id = db.Column(db.Integer, primary_key=True) # primary keys are required by SQLAlchemy
  6. email = db.Column(db.String(100), unique=True)
  7. password = db.Column(db.String(100))
  8. name = db.Column(db.String(1000))
  9. class Tool(db.Model):
  10. id = db.Column(db.Integer, primary_key=True) # primary keys are required by SQLAlchemy
  11. created = db.Column(db.DateTime, default=datetime.utcnow)
  12. name = db.Column(db.Text)
  13. description = db.Column(db.Text)