Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save hasithadulanjana/052c4be9e7e760f116873bfbff3a2c7c to your computer and use it in GitHub Desktop.
Save hasithadulanjana/052c4be9e7e760f116873bfbff3a2c7c to your computer and use it in GitHub Desktop.
app/models.py
from app import db
class User(db.Model):
id = db.Column(db.Integer, primary_key=True)
name = db.Column(db.String(80), nullable=False)
email = db.Column(db.String(120), unique=True, nullable=False)
def __repr__(self):
return f'<User {self.name}>'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment