Skip to content
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
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "datagsm-openapi-sdk"
version = "1.1.1"
version = "1.2.0"
description = "Python SDK for DataGSM OpenAPI"
readme = "README.md"
requires-python = ">=3.9"
Expand Down
2 changes: 1 addition & 1 deletion src/datagsm_openapi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
ValidationException,
)

__version__ = "1.1.1"
__version__ = "1.2.0"

__all__ = [
"BadRequestException",
Expand Down
5 changes: 4 additions & 1 deletion src/datagsm_openapi/api/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from dataclasses import dataclass
from typing import Optional

from ..models import Project, ProjectResponse, ProjectSortBy, SortDirection
from ..models import Project, ProjectResponse, ProjectSortBy, ProjectStatus, SortDirection
from ._base import BaseApi


Expand All @@ -15,6 +15,7 @@ class ProjectRequest:
project_id: Project ID for exact match
project_name: Project name for filtering
club_id: Club ID filter
status: Project operation status filter (default: ACTIVE)
page: Page number (default: 0)
size: Page size (default: 100)
sort_by: Sort field
Expand All @@ -24,6 +25,7 @@ class ProjectRequest:
project_id: Optional[int] = None
project_name: Optional[str] = None
club_id: Optional[int] = None
status: Optional[ProjectStatus] = ProjectStatus.ACTIVE
page: int = 0
size: int = 100
sort_by: Optional[ProjectSortBy] = None
Expand All @@ -39,6 +41,7 @@ def to_params(self) -> dict[str, Optional[object]]:
"projectId": self.project_id,
"projectName": self.project_name,
"clubId": self.club_id,
"status": self.status.value if self.status else None,
"page": self.page,
"size": self.size,
"sortBy": self.sort_by.value if self.sort_by else None,
Expand Down
2 changes: 2 additions & 0 deletions src/datagsm_openapi/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
Major,
MealType,
ProjectSortBy,
ProjectStatus,
Sex,
SortDirection,
StudentRole,
Expand All @@ -33,6 +34,7 @@
"Project",
"ProjectResponse",
"ProjectSortBy",
"ProjectStatus",
"Schedule",
"Sex",
"SortDirection",
Expand Down
7 changes: 7 additions & 0 deletions src/datagsm_openapi/models/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,10 @@ class ProjectSortBy(str, Enum):

ID = "ID"
NAME = "NAME"


class ProjectStatus(str, Enum):
"""프로젝트 운영 상태 (Project Status)."""

ACTIVE = "ACTIVE"
ENDED = "ENDED"
10 changes: 9 additions & 1 deletion src/datagsm_openapi/models/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from pydantic import BaseModel, ConfigDict, Field

from .club import Club
from .enums import Major, Sex
from .enums import Major, ProjectStatus, Sex


class ParticipantInfo(BaseModel):
Expand Down Expand Up @@ -43,6 +43,9 @@ class Project(BaseModel):
description: Project description
club: Associated club
participants: List of project participants
start_year: Year the project started
end_year: Year the project ended (None if still active)
status: Project operation status (ACTIVE or ENDED)
"""

id: int = Field(..., description="Project ID")
Expand All @@ -52,6 +55,11 @@ class Project(BaseModel):
participants: list[ParticipantInfo] = Field(
default_factory=list, description="Project participants"
)
start_year: int = Field(..., alias="startYear", description="Year the project started")
end_year: Optional[int] = Field(
None, alias="endYear", description="Year the project ended"
)
status: ProjectStatus = Field(..., description="Project operation status")

model_config = ConfigDict(populate_by_name=True)

Expand Down
Loading