from typing import Optional

from pydantic import EmailStr
from sqlmodel import Field, SQLModel


# define your database tables (models) here
class User(SQLModel, table=True):
    id: Optional[int] = Field(default=None, nullable=False, primary_key=True)
    name: str = Field(nullable=False)
    email: EmailStr = Field(
        nullable=False,
    )
    password: str = Field(nullable=False)

sqlmodel.Field
[((200, 253), 'sqlmodel.Field', 'Field', ([], {'default': 'None', 'nullable': '(False)', 'primary_key': '(True)'}), '(default=None, nullable=False, primary_key=True)\n', (205, 253), False, 'from sqlmodel import Field, SQLModel\n'), ((270, 291), 'sqlmodel.Field', 'Field', ([], {'nullable': '(False)'}), '(nullable=False)\n', (275, 291), False, 'from sqlmodel import Field, SQLModel\n'), ((314, 335), 'sqlmodel.Field', 'Field', ([], {'nullable': '(False)'}), '(nullable=False)\n', (319, 335), False, 'from sqlmodel import Field, SQLModel\n'), ((371, 392), 'sqlmodel.Field', 'Field', ([], {'nullable': '(False)'}), '(nullable=False)\n', (376, 392), False, 'from sqlmodel import Field, SQLModel\n')]