Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Dependency]: Vault -- Checkpoint 1 #2332

Merged
merged 6 commits into from
Dec 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion agenta-backend/agenta_backend/core/shared/dtos.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,20 @@


class LifecycleDTO(BaseModel):
created_at: datetime
created_at: Optional[datetime] = None
updated_at: Optional[datetime] = None

updated_by_id: Optional[UUID] = None


class IdentifierDTO(BaseModel):
id: UUID


class SlugDTO(BaseModel):
slug: str


class HeaderDTO(BaseModel):
name: Optional[str] = None
description: Optional[str] = None
36 changes: 35 additions & 1 deletion agenta-backend/agenta_backend/dbs/postgres/shared/dbas.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from sqlalchemy import Column, UUID, TIMESTAMP, func
from sqlalchemy.dialects.postgresql import JSONB
from sqlalchemy import Column, String, UUID, TIMESTAMP, func, Integer


class ProjectScopeDBA:
Expand Down Expand Up @@ -27,3 +28,36 @@ class LifecycleDBA:
UUID(as_uuid=True),
nullable=True,
)


class IdentifierDBA:
__abstract__ = True

id = Column(UUID(as_uuid=True), nullable=False)


class SlugDBA:
__abstract__ = True

slug = Column(String, nullable=False)


class HeaderDBA:
__abstract__ = True

name = Column(String, nullable=True)
description = Column(String, nullable=True)


class VersionedDBA:
__abstract__ = True

slug = Column(String, nullable=False)
version = Column(Integer, nullable=False)
id = Column(UUID(as_uuid=True), nullable=False)


class TagsDBA:
__abstract__ = True

tags = Column(JSONB(none_as_null=True), nullable=True)
Loading