from datetime import datetime
from typing import Optional
from sqlmodel import Field, SQLModel, Relationship
from sqlalchemy import Column
from sqlalchemy.dialects.postgresql import JSON


class ZeroShotInferenceBase(SQLModel):
    text: str = Field(nullable=False, index=True)
    candidate_labels: list[str] = Field(
        nullable=False, index=True, sa_column=Column(JSON)
    )


class ZeroShotInference(ZeroShotInferenceBase, table=True):
    id: Optional[int] = 