add user auth boilerplate
This commit is contained in:
parent
4a65664f4a
commit
4ad04775c9
8 changed files with 275 additions and 4 deletions
|
|
@ -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
8
crawler/models/user.py
Normal 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)
|
||||
Loading…
Add table
Add a link
Reference in a new issue