Skip to content

Commit

Permalink
feat: 专栏增加描述数据
Browse files Browse the repository at this point in the history
  • Loading branch information
MarleneJiang committed Feb 12, 2023
1 parent e71aeb9 commit 11e0edf
Show file tree
Hide file tree
Showing 5 changed files with 168 additions and 3 deletions.
Binary file modified backend/.tmp/data.db
Binary file not shown.
11 changes: 10 additions & 1 deletion backend/src/api/colum/content-types/colum/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"info": {
"singularName": "colum",
"pluralName": "colums",
"displayName": "colum"
"displayName": "colum",
"description": ""
},
"options": {
"draftAndPublish": true
Expand All @@ -21,6 +22,14 @@
"relation": "oneToMany",
"target": "api::article.article",
"mappedBy": "columId"
},
"cover": {
"type": "string",
"required": true
},
"describe": {
"type": "string",
"required": true
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"name": "Apache 2.0",
"url": "https://www.apache.org/licenses/LICENSE-2.0.html"
},
"x-generation-date": "2023-02-12T04:51:09.525Z"
"x-generation-date": "2023-02-12T05:42:21.560Z"
},
"x-strapi-config": {
"path": "/documentation",
Expand Down Expand Up @@ -701,6 +701,12 @@
}
}
},
"cover": {
"type": "string"
},
"describe": {
"type": "string"
},
"createdAt": {
"type": "string",
"format": "date-time"
Expand Down Expand Up @@ -1608,6 +1614,12 @@
}
}
},
"cover": {
"type": "string"
},
"describe": {
"type": "string"
},
"createdAt": {
"type": "string",
"format": "date-time"
Expand Down Expand Up @@ -2548,6 +2560,12 @@
}
}
},
"cover": {
"type": "string"
},
"describe": {
"type": "string"
},
"createdAt": {
"type": "string",
"format": "date-time"
Expand Down Expand Up @@ -3455,6 +3473,12 @@
}
}
},
"cover": {
"type": "string"
},
"describe": {
"type": "string"
},
"createdAt": {
"type": "string",
"format": "date-time"
Expand Down Expand Up @@ -4580,6 +4604,12 @@
}
}
},
"cover": {
"type": "string"
},
"describe": {
"type": "string"
},
"createdAt": {
"type": "string",
"format": "date-time"
Expand Down Expand Up @@ -5428,6 +5458,12 @@
}
}
},
"cover": {
"type": "string"
},
"describe": {
"type": "string"
},
"createdAt": {
"type": "string",
"format": "date-time"
Expand Down Expand Up @@ -6309,6 +6345,12 @@
}
}
},
"cover": {
"type": "string"
},
"describe": {
"type": "string"
},
"createdAt": {
"type": "string",
"format": "date-time"
Expand Down Expand Up @@ -7157,6 +7199,12 @@
}
}
},
"cover": {
"type": "string"
},
"describe": {
"type": "string"
},
"createdAt": {
"type": "string",
"format": "date-time"
Expand Down Expand Up @@ -7360,7 +7408,9 @@
"properties": {
"data": {
"required": [
"column"
"column",
"cover",
"describe"
],
"type": "object",
"properties": {
Expand All @@ -7380,6 +7430,12 @@
],
"example": "string or id"
}
},
"cover": {
"type": "string"
},
"describe": {
"type": "string"
}
}
}
Expand Down Expand Up @@ -8037,6 +8093,12 @@
}
}
},
"cover": {
"type": "string"
},
"describe": {
"type": "string"
},
"createdAt": {
"type": "string",
"format": "date-time"
Expand Down Expand Up @@ -8162,6 +8224,12 @@
}
}
},
"cover": {
"type": "string"
},
"describe": {
"type": "string"
},
"createdAt": {
"type": "string",
"format": "date-time"
Expand Down Expand Up @@ -8864,6 +8932,12 @@
}
}
},
"cover": {
"type": "string"
},
"describe": {
"type": "string"
},
"createdAt": {
"type": "string",
"format": "date-time"
Expand Down Expand Up @@ -8989,6 +9063,12 @@
}
}
},
"cover": {
"type": "string"
},
"describe": {
"type": "string"
},
"createdAt": {
"type": "string",
"format": "date-time"
Expand Down Expand Up @@ -9724,6 +9804,12 @@
}
}
},
"cover": {
"type": "string"
},
"describe": {
"type": "string"
},
"createdAt": {
"type": "string",
"format": "date-time"
Expand Down Expand Up @@ -9849,6 +9935,12 @@
}
}
},
"cover": {
"type": "string"
},
"describe": {
"type": "string"
},
"createdAt": {
"type": "string",
"format": "date-time"
Expand Down Expand Up @@ -10551,6 +10643,12 @@
}
}
},
"cover": {
"type": "string"
},
"describe": {
"type": "string"
},
"createdAt": {
"type": "string",
"format": "date-time"
Expand Down Expand Up @@ -10676,6 +10774,12 @@
}
}
},
"cover": {
"type": "string"
},
"describe": {
"type": "string"
},
"createdAt": {
"type": "string",
"format": "date-time"
Expand Down Expand Up @@ -12999,6 +13103,12 @@
}
}
},
"cover": {
"type": "string"
},
"describe": {
"type": "string"
},
"createdAt": {
"type": "string",
"format": "date-time"
Expand Down Expand Up @@ -13846,6 +13956,12 @@
}
}
},
"cover": {
"type": "string"
},
"describe": {
"type": "string"
},
"createdAt": {
"type": "string",
"format": "date-time"
Expand Down Expand Up @@ -14726,6 +14842,12 @@
}
}
},
"cover": {
"type": "string"
},
"describe": {
"type": "string"
},
"createdAt": {
"type": "string",
"format": "date-time"
Expand Down Expand Up @@ -15573,6 +15695,12 @@
}
}
},
"cover": {
"type": "string"
},
"describe": {
"type": "string"
},
"createdAt": {
"type": "string",
"format": "date-time"
Expand Down Expand Up @@ -16481,6 +16609,12 @@
}
}
},
"cover": {
"type": "string"
},
"describe": {
"type": "string"
},
"createdAt": {
"type": "string",
"format": "date-time"
Expand Down Expand Up @@ -17331,6 +17465,12 @@
}
}
},
"cover": {
"type": "string"
},
"describe": {
"type": "string"
},
"createdAt": {
"type": "string",
"format": "date-time"
Expand Down Expand Up @@ -18214,6 +18354,12 @@
}
}
},
"cover": {
"type": "string"
},
"describe": {
"type": "string"
},
"createdAt": {
"type": "string",
"format": "date-time"
Expand Down Expand Up @@ -19064,6 +19210,12 @@
}
}
},
"cover": {
"type": "string"
},
"describe": {
"type": "string"
},
"createdAt": {
"type": "string",
"format": "date-time"
Expand Down
2 changes: 2 additions & 0 deletions frontend/server/api/articles/[id].ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ export default defineEventHandler(async (event): Promise<IArticle> => {
data{
attributes{
column
cover
describe
articles{
data{
id
Expand Down
2 changes: 2 additions & 0 deletions frontend/types/IArticle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ interface IColumnArticleItem {
}
interface IColumn {
column: string
cover: string
describe: string
articles: { data: IColumnArticleItem[] }
}
export interface IArticle {
Expand Down

0 comments on commit 11e0edf

Please sign in to comment.