fixes and modelgen insert

This commit is contained in:
2026-02-04 09:53:48 -03:00
parent b88f75fce0
commit 30b2e1cf44
52 changed files with 5317 additions and 178 deletions

View File

@@ -0,0 +1,38 @@
"""
Base Extractor
Abstract base class for model extractors.
"""
from abc import ABC, abstractmethod
from pathlib import Path
from typing import List
from ..schema import EnumDefinition, ModelDefinition
class BaseExtractor(ABC):
"""Abstract base for codebase model extractors."""
def __init__(self, source_path: Path):
self.source_path = Path(source_path)
@abstractmethod
def extract(self) -> tuple[List[ModelDefinition], List[EnumDefinition]]:
"""
Extract model definitions from source codebase.
Returns:
Tuple of (models, enums)
"""
pass
@abstractmethod
def detect(self) -> bool:
"""
Detect if this extractor can handle the source path.
Returns:
True if this extractor can handle the source
"""
pass