import uuid
from datetime import datetime
from typing import Optional

from sqlalchemy import Column
from sqlalchemy.dialects.postgresql import JSON
from sqlmodel import Field, Relationship

from api.db.models.base import BaseModel, BaseTable


class OutOfBandBase(BaseModel):
    msg_type: str = Field(nullable=False)
    msg: dict = Field(default={}, sa_column=Column(JSON))
    sender_id: uuid.UUID = None
    recipient_id: uuid.UUID = None
    sandbox_id: uuid.UUID = None
    action: Optional[str] = 