# Copyright (c) 2025 Patrick Motsch
# All rights reserved.
"""Ticket datamodels used across Jira/ClickUp connectors."""

from typing import Optional
from pydantic import BaseModel, Field
from abc import ABC, abstractmethod


class TicketFieldAttribute(BaseModel):
    fieldName: str = Field(description="Human-readable field name")
    field: str = Field(description="Ticket field ID/key")

class TicketBase(ABC):
    @abstractmethod
    async def readAttributes(self) -> list[TicketFieldAttribute]: ...

    @abstractmethod
    async def readTasks(self, *, limit: int = 0) -> list[dict]: ...

    @abstractmethod
    async def writeTasks(self, tasklist: list[dict]) -> None: ...


