from typing import Optional
from pydantic import BaseModel
from sator_core.models.product import Product


class PatchLocator(BaseModel):
    vulnerability_id: str
    repository_id: int
    commit_sha: str


class VulnerabilityLocator(BaseModel):
    product: Product
    version: Optional[str] = None
    function: Optional[str] = None
    file: Optional[str] = None
