add user auth boilerplate

This commit is contained in:
Viktor Barzin 2025-06-11 21:08:11 +00:00
parent 4a65664f4a
commit 4ad04775c9
No known key found for this signature in database
GPG key ID: 4056458DBDBF8863
8 changed files with 275 additions and 4 deletions

View file

@ -1,4 +1,5 @@
from models.listing import Listing
from models.user import User
__all__ = ["Listing"]
__all__ = ["Listing", "User"]

8
crawler/models/user.py Normal file
View file

@ -0,0 +1,8 @@
from pydantic import EmailStr
from sqlmodel import SQLModel, Field
class User(SQLModel, table=True):
id: int = Field(primary_key=True)
email: EmailStr = Field(index=True, unique=True)
password: str = Field(nullable=False)