Skip to content

Commit

Permalink
Create user.py
Browse files Browse the repository at this point in the history
  • Loading branch information
KOSASIH authored May 11, 2024
1 parent dcd8238 commit 400f33a
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions app/models/user.py
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 400f33a

Please sign in to comment.