mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-27 01:36:30 +02:00
15 lines
385 B
Python
15 lines
385 B
Python
|
|
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)
|