generated from coulomb/repo-seed
Milestone 0 plus the manual-registry spine from Milestone 1
This commit is contained in:
66
src/repo_registry/core/models.py
Normal file
66
src/repo_registry/core/models.py
Normal file
@@ -0,0 +1,66 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from dataclasses import dataclass, field
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class Repository:
|
||||
id: int
|
||||
name: str
|
||||
url: str
|
||||
description: str | None
|
||||
branch: str
|
||||
status: str
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class Evidence:
|
||||
id: int
|
||||
type: str
|
||||
reference: str
|
||||
strength: str
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class Feature:
|
||||
id: int
|
||||
name: str
|
||||
type: str
|
||||
location: str
|
||||
confidence: float
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class Capability:
|
||||
id: int
|
||||
name: str
|
||||
description: str
|
||||
inputs: list[str]
|
||||
outputs: list[str]
|
||||
confidence: float
|
||||
features: list[Feature] = field(default_factory=list)
|
||||
evidence: list[Evidence] = field(default_factory=list)
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class Ability:
|
||||
id: int
|
||||
name: str
|
||||
description: str
|
||||
confidence: float
|
||||
capabilities: list[Capability] = field(default_factory=list)
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class RepositoryAbilityMap:
|
||||
repository: Repository
|
||||
abilities: list[Ability]
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class SearchResult:
|
||||
repository_id: int
|
||||
repository_name: str
|
||||
match_type: str
|
||||
match_name: str
|
||||
confidence: float
|
||||
Reference in New Issue
Block a user