mirror of
https://github.com/MODSetter/SurfSense.git
synced 2025-09-17 01:29:44 +00:00
init
This commit is contained in:
parent
24f641347d
commit
63146aa9b7
86 changed files with 18766 additions and 0 deletions
14
backend/models.py
Normal file
14
backend/models.py
Normal file
|
@ -0,0 +1,14 @@
|
|||
from sqlalchemy import Column, Integer, String
|
||||
from database import Base
|
||||
from database import engine
|
||||
|
||||
class User(Base):
|
||||
__tablename__ = "users"
|
||||
|
||||
id = Column(Integer, primary_key=True, index=True)
|
||||
username = Column(String, unique=True, index=True)
|
||||
hashed_password = Column(String)
|
||||
|
||||
# Create the database tables if they don't exist
|
||||
|
||||
User.metadata.create_all(bind=engine)
|
Loading…
Add table
Add a link
Reference in a new issue