2025-02-19 13:02:10 +01:00

9 lines
317 B
Python

from sqlmodel import SQLModel, Field
from uuid import uuid4, UUID
class User(SQLModel, table=True):
id: UUID = Field(default_factory=uuid4, primary_key=True)
username: str = Field(unique=True, nullable=False)
email: str = Field(unique=True, nullable=False)
password_hash: str = Field(nullable=False)