9 lines
236 B
Python
9 lines
236 B
Python
|
|
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)
|