generated from coulomb/repo-seed
feat: reexport domain schemas from hub-core
This commit is contained in:
@@ -1,24 +1,8 @@
|
||||
import uuid
|
||||
from datetime import datetime
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
class DomainCreate(BaseModel):
|
||||
slug: str
|
||||
name: str
|
||||
description: str | None = None
|
||||
|
||||
|
||||
class DomainUpdate(BaseModel):
|
||||
name: str | None = None
|
||||
description: str | None = None
|
||||
status: str | None = None
|
||||
|
||||
|
||||
class DomainRename(BaseModel):
|
||||
new_slug: str
|
||||
new_name: str
|
||||
from hub_core.schemas.domain import DomainCreate, DomainRead, DomainRename, DomainUpdate
|
||||
|
||||
|
||||
class RepoStub(BaseModel):
|
||||
@@ -31,17 +15,6 @@ class RepoStub(BaseModel):
|
||||
status: str
|
||||
|
||||
|
||||
class DomainRead(BaseModel):
|
||||
model_config = ConfigDict(from_attributes=True)
|
||||
id: uuid.UUID
|
||||
slug: str
|
||||
name: str
|
||||
description: str | None = None
|
||||
status: str
|
||||
created_at: datetime
|
||||
updated_at: datetime
|
||||
|
||||
|
||||
class DomainDetail(DomainRead):
|
||||
"""Domain with entity counts and repo list."""
|
||||
topic_count: int = 0
|
||||
@@ -59,3 +32,14 @@ class DomainSummary(BaseModel):
|
||||
active_workstream_count: int = 0
|
||||
ep_count: int = 0
|
||||
td_count: int = 0
|
||||
|
||||
|
||||
__all__ = [
|
||||
"DomainCreate",
|
||||
"DomainDetail",
|
||||
"DomainRead",
|
||||
"DomainRename",
|
||||
"DomainSummary",
|
||||
"DomainUpdate",
|
||||
"RepoStub",
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user