diff --git a/app/models/user.py b/app/models/user.py new file mode 100644 index 0000000..e413270 --- /dev/null +++ b/app/models/user.py @@ -0,0 +1,17 @@ +# User model +from sqlalchemy import Column, Integer, String +from sqlalchemy.ext.declarative import declarative_base + +Base = declarative_base() + +class User(Base): + __tablename__ = 'users' + id = Column(Integer, primary_key=True) + username = Column(String, unique=True) + password = Column(String) + email = Column(String, unique=True) + + def __init__(self, username, password, email): + self.username = username + self.password = password + self.email = email