from typing import Optional
from sqlmodel import Field, SQLModel
from datetime import datetime


class Capacity(SQLModel, table=True):
    """Create an SQLModel for capcities"""

    id: Optional[int] = Field(default=None, primary_key=True)
    user_id: int = Field(foreign_key="app_db.appuser.id")
    team_id: int = Field(foreign_key="app_db.team.id")
    year: int
    month: int
    days: int
    created_at: datetime
    updated_at: datetime
    is_locked: bool = False

    __table_args__ = {"schema": "app_db"}

sqlmodel.Field
[((203, 240), 'sqlmodel.Field', 'Field', ([], {'default': 'None', 'primary_key': '(True)'}), '(default=None, primary_key=True)\n', (208, 240), False, 'from sqlmodel import Field, SQLModel\n'), ((260, 298), 'sqlmodel.Field', 'Field', ([], {'foreign_key': '"""app_db.appuser.id"""'}), "(foreign_key='app_db.appuser.id')\n", (265, 298), False, 'from sqlmodel import Field, SQLModel\n'), ((318, 353), 'sqlmodel.Field', 'Field', ([], {'foreign_key': '"""app_db.team.id"""'}), "(foreign_key='app_db.team.id')\n", (323, 353), False, 'from sqlmodel import Field, SQLModel\n')]