feat: CONAI Phase 1 MVP 초기 구현
소형 건설업체(100억 미만)를 위한 AI 기반 토목공사 통합관리 플랫폼 Backend (FastAPI): - SQLAlchemy 모델 13개 (users, projects, wbs, tasks, daily_reports, reports, inspections, quality, weather, permits, rag, settings) - API 라우터 11개 (auth, projects, tasks, daily_reports, reports, inspections, weather, rag, kakao, permits, settings) - Services: Claude AI 래퍼, CPM Gantt 계산, 기상청 API, RAG(pgvector), 카카오 Skill API - Alembic 마이그레이션 (pgvector 포함) - pytest 테스트 (CPM, 날씨 경보) Frontend (Next.js 15): - 11개 페이지 (대시보드, 프로젝트, Gantt, 일보, 검측, 품질, 날씨, 인허가, RAG, 설정) - TanStack Query + Zustand + Tailwind CSS 인프라: - Docker Compose (PostgreSQL pgvector + backend + frontend) - 한국어 README 및 설치 가이드 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,76 @@
|
||||
import uuid
|
||||
from datetime import date, datetime
|
||||
from pydantic import BaseModel
|
||||
from app.models.project import ProjectStatus, ConstructionType
|
||||
|
||||
|
||||
class WBSItemCreate(BaseModel):
|
||||
parent_id: uuid.UUID | None = None
|
||||
code: str
|
||||
name: str
|
||||
level: int = 1
|
||||
unit: str | None = None
|
||||
design_qty: float | None = None
|
||||
unit_price: float | None = None
|
||||
sort_order: int = 0
|
||||
|
||||
|
||||
class WBSItemResponse(BaseModel):
|
||||
id: uuid.UUID
|
||||
project_id: uuid.UUID
|
||||
parent_id: uuid.UUID | None
|
||||
code: str
|
||||
name: str
|
||||
level: int
|
||||
unit: str | None
|
||||
design_qty: float | None
|
||||
unit_price: float | None
|
||||
sort_order: int
|
||||
children: list["WBSItemResponse"] = []
|
||||
|
||||
model_config = {"from_attributes": True}
|
||||
|
||||
|
||||
class ProjectCreate(BaseModel):
|
||||
name: str
|
||||
code: str
|
||||
client_profile_id: uuid.UUID | None = None
|
||||
construction_type: ConstructionType = ConstructionType.OTHER
|
||||
contract_amount: int | None = None
|
||||
start_date: date | None = None
|
||||
end_date: date | None = None
|
||||
location_address: str | None = None
|
||||
location_lat: float | None = None
|
||||
location_lng: float | None = None
|
||||
|
||||
|
||||
class ProjectUpdate(BaseModel):
|
||||
name: str | None = None
|
||||
client_profile_id: uuid.UUID | None = None
|
||||
construction_type: ConstructionType | None = None
|
||||
contract_amount: int | None = None
|
||||
start_date: date | None = None
|
||||
end_date: date | None = None
|
||||
location_address: str | None = None
|
||||
location_lat: float | None = None
|
||||
location_lng: float | None = None
|
||||
status: ProjectStatus | None = None
|
||||
|
||||
|
||||
class ProjectResponse(BaseModel):
|
||||
id: uuid.UUID
|
||||
name: str
|
||||
code: str
|
||||
client_profile_id: uuid.UUID | None
|
||||
construction_type: ConstructionType
|
||||
contract_amount: int | None
|
||||
start_date: date | None
|
||||
end_date: date | None
|
||||
location_address: str | None
|
||||
location_lat: float | None
|
||||
location_lng: float | None
|
||||
status: ProjectStatus
|
||||
owner_id: uuid.UUID
|
||||
created_at: datetime
|
||||
|
||||
model_config = {"from_attributes": True}
|
||||
Reference in New Issue
Block a user