Spaces:
Sleeping
Sleeping
ktsn-ud commited on
Commit ·
414e0d3
1
Parent(s): 91441ab
remarksをremarkに一括変更し,リスト型から文字列型に
Browse files
app/main.py
CHANGED
|
@@ -123,7 +123,7 @@ def get_summary_data():
|
|
| 123 |
location=project.location,
|
| 124 |
description=project.description,
|
| 125 |
prSummary=project.prSummary,
|
| 126 |
-
|
| 127 |
image=image,
|
| 128 |
tags=project.tags,
|
| 129 |
)
|
|
|
|
| 123 |
location=project.location,
|
| 124 |
description=project.description,
|
| 125 |
prSummary=project.prSummary,
|
| 126 |
+
remark=project.remark,
|
| 127 |
image=image,
|
| 128 |
tags=project.tags,
|
| 129 |
)
|
app/repositories/projects_repository.py
CHANGED
|
@@ -85,7 +85,7 @@ class ProjectsRepository:
|
|
| 85 |
description=row["description"],
|
| 86 |
prSummary=row["prSummary"],
|
| 87 |
prDetail=row["prDetail"],
|
| 88 |
-
|
| 89 |
images=[Image(**img) for img in _coerce_dict_list(row.get("images"))],
|
| 90 |
socialMedia=[
|
| 91 |
Sns(**url) for url in _coerce_dict_list(row.get("socialMedia"))
|
|
|
|
| 85 |
description=row["description"],
|
| 86 |
prSummary=row["prSummary"],
|
| 87 |
prDetail=row["prDetail"],
|
| 88 |
+
remark=row.get("remark") or None,
|
| 89 |
images=[Image(**img) for img in _coerce_dict_list(row.get("images"))],
|
| 90 |
socialMedia=[
|
| 91 |
Sns(**url) for url in _coerce_dict_list(row.get("socialMedia"))
|
schemas/projects.py
CHANGED
|
@@ -40,7 +40,7 @@ class Project(BaseModel):
|
|
| 40 |
- `description`: 企画内容
|
| 41 |
- `prSummary`: PRコメント
|
| 42 |
- `prDetail`: PRコメント(詳細ページ用)
|
| 43 |
-
- `
|
| 44 |
- `images`: 画像情報
|
| 45 |
- `socialMedia`: 各種URL情報
|
| 46 |
"""
|
|
@@ -59,7 +59,7 @@ class Project(BaseModel):
|
|
| 59 |
description: str | None
|
| 60 |
prSummary: str | None
|
| 61 |
prDetail: str | None
|
| 62 |
-
|
| 63 |
images: list[Image]
|
| 64 |
socialMedia: list[Sns]
|
| 65 |
tags: list[str] | None
|
|
@@ -77,7 +77,7 @@ class ProjectSummary(BaseModel):
|
|
| 77 |
- `place`: 実施場所
|
| 78 |
- `description`: 企画内容
|
| 79 |
- `prSummary`: PRコメント
|
| 80 |
-
- `
|
| 81 |
- `image`: 画像情報
|
| 82 |
"""
|
| 83 |
|
|
@@ -93,7 +93,7 @@ class ProjectSummary(BaseModel):
|
|
| 93 |
location: str | None
|
| 94 |
description: str | None
|
| 95 |
prSummary: str | None
|
| 96 |
-
|
| 97 |
image: Image | None
|
| 98 |
tags: list[str] | None
|
| 99 |
|
|
@@ -111,7 +111,7 @@ class ProjectDetail(BaseModel):
|
|
| 111 |
- `description`: 企画内容
|
| 112 |
- `prSummary`: PRコメント
|
| 113 |
- `prDetail`: PRコメント(詳細ページ用)
|
| 114 |
-
- `
|
| 115 |
- `images`: 画像情報
|
| 116 |
- `socialMedia`: 各種URL情報
|
| 117 |
"""
|
|
@@ -129,7 +129,7 @@ class ProjectDetail(BaseModel):
|
|
| 129 |
description: str | None
|
| 130 |
prSummary: str | None
|
| 131 |
prDetail: str | None
|
| 132 |
-
|
| 133 |
images: list[Image]
|
| 134 |
socialMedia: list[Sns]
|
| 135 |
tags: list[str] | None
|
|
|
|
| 40 |
- `description`: 企画内容
|
| 41 |
- `prSummary`: PRコメント
|
| 42 |
- `prDetail`: PRコメント(詳細ページ用)
|
| 43 |
+
- `remark`: 注意事項
|
| 44 |
- `images`: 画像情報
|
| 45 |
- `socialMedia`: 各種URL情報
|
| 46 |
"""
|
|
|
|
| 59 |
description: str | None
|
| 60 |
prSummary: str | None
|
| 61 |
prDetail: str | None
|
| 62 |
+
remark: str | None
|
| 63 |
images: list[Image]
|
| 64 |
socialMedia: list[Sns]
|
| 65 |
tags: list[str] | None
|
|
|
|
| 77 |
- `place`: 実施場所
|
| 78 |
- `description`: 企画内容
|
| 79 |
- `prSummary`: PRコメント
|
| 80 |
+
- `remark`: 注意事項
|
| 81 |
- `image`: 画像情報
|
| 82 |
"""
|
| 83 |
|
|
|
|
| 93 |
location: str | None
|
| 94 |
description: str | None
|
| 95 |
prSummary: str | None
|
| 96 |
+
remark: str | None
|
| 97 |
image: Image | None
|
| 98 |
tags: list[str] | None
|
| 99 |
|
|
|
|
| 111 |
- `description`: 企画内容
|
| 112 |
- `prSummary`: PRコメント
|
| 113 |
- `prDetail`: PRコメント(詳細ページ用)
|
| 114 |
+
- `remark`: 注意事項
|
| 115 |
- `images`: 画像情報
|
| 116 |
- `socialMedia`: 各種URL情報
|
| 117 |
"""
|
|
|
|
| 129 |
description: str | None
|
| 130 |
prSummary: str | None
|
| 131 |
prDetail: str | None
|
| 132 |
+
remark: str | None
|
| 133 |
images: list[Image]
|
| 134 |
socialMedia: list[Sns]
|
| 135 |
tags: list[str] | None
|
tests/repositories/test_projects_repository.py
CHANGED
|
@@ -87,7 +87,7 @@ class ProjectsRepositoryTestCase(unittest.TestCase):
|
|
| 87 |
"description": "Description",
|
| 88 |
"prSummary": "PR",
|
| 89 |
"prDetail": "Long PR",
|
| 90 |
-
"
|
| 91 |
"images": [
|
| 92 |
{"filename": "primary", "extension": "png", "order": 0},
|
| 93 |
{"filename": "sub", "extension": "png", "order": 1},
|
|
@@ -106,7 +106,7 @@ class ProjectsRepositoryTestCase(unittest.TestCase):
|
|
| 106 |
self.assertEqual(api_row.circleName, "Circle A")
|
| 107 |
self.assertEqual(api_row.category, "パフォーマンス")
|
| 108 |
self.assertTrue(api_row.day1)
|
| 109 |
-
self.assertEqual(api_row.
|
| 110 |
self.assertEqual(api_row.images[0].filename, "primary")
|
| 111 |
self.assertEqual(api_row.socialMedia[0].service, "X")
|
| 112 |
|
|
|
|
| 87 |
"description": "Description",
|
| 88 |
"prSummary": "PR",
|
| 89 |
"prDetail": "Long PR",
|
| 90 |
+
"remark": "注意事項",
|
| 91 |
"images": [
|
| 92 |
{"filename": "primary", "extension": "png", "order": 0},
|
| 93 |
{"filename": "sub", "extension": "png", "order": 1},
|
|
|
|
| 106 |
self.assertEqual(api_row.circleName, "Circle A")
|
| 107 |
self.assertEqual(api_row.category, "パフォーマンス")
|
| 108 |
self.assertTrue(api_row.day1)
|
| 109 |
+
self.assertEqual(api_row.remark, "注意事項")
|
| 110 |
self.assertEqual(api_row.images[0].filename, "primary")
|
| 111 |
self.assertEqual(api_row.socialMedia[0].service, "X")
|
| 112 |
|
tests/services/test_projects_service.py
CHANGED
|
@@ -84,7 +84,7 @@ class FakeProjectsRepository:
|
|
| 84 |
"description": "Description",
|
| 85 |
"prSummary": "PR",
|
| 86 |
"prDetail": "Long PR",
|
| 87 |
-
"
|
| 88 |
"images": [
|
| 89 |
{"filename": "img", "extension": "png", "order": 0},
|
| 90 |
{"filename": "img2", "extension": "png", "order": 1},
|
|
|
|
| 84 |
"description": "Description",
|
| 85 |
"prSummary": "PR",
|
| 86 |
"prDetail": "Long PR",
|
| 87 |
+
"remark": "注意事項",
|
| 88 |
"images": [
|
| 89 |
{"filename": "img", "extension": "png", "order": 0},
|
| 90 |
{"filename": "img2", "extension": "png", "order": 1},
|