Created
February 10, 2025 05:22
-
-
Save hasithadulanjana/052c4be9e7e760f116873bfbff3a2c7c to your computer and use it in GitHub Desktop.
app/models.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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