Skip to content
This repository was archived by the owner on Dec 26, 2023. It is now read-only.

Commit de34afd

Browse files
committed
update models
1 parent b2b3412 commit de34afd

File tree

5 files changed

+78
-14
lines changed

5 files changed

+78
-14
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
"kind": "collectionType",
3+
"collectionName": "guilds",
4+
"info": {
5+
"singularName": "guild",
6+
"pluralName": "guilds",
7+
"displayName": "Guild"
8+
},
9+
"options": {
10+
"draftAndPublish": false
11+
},
12+
"pluginOptions": {
13+
"i18n": {
14+
"localized": true
15+
}
16+
},
17+
"attributes": {
18+
"guild_name": {
19+
"pluginOptions": {
20+
"i18n": {
21+
"localized": true
22+
}
23+
},
24+
"type": "enumeration",
25+
"enum": [
26+
"Development",
27+
"Marketing",
28+
"Education",
29+
"Governance"
30+
]
31+
},
32+
"projects": {
33+
"type": "relation",
34+
"relation": "manyToMany",
35+
"target": "api::project.project",
36+
"mappedBy": "guilds"
37+
}
38+
}
39+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
'use strict';
2+
3+
/**
4+
* guild controller
5+
*/
6+
7+
const { createCoreController } = require('@strapi/strapi').factories;
8+
9+
module.exports = createCoreController('api::guild.guild');

cms/src/api/guild/routes/guild.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
'use strict';
2+
3+
/**
4+
* guild router.
5+
*/
6+
7+
const { createCoreRouter } = require('@strapi/strapi').factories;
8+
9+
module.exports = createCoreRouter('api::guild.guild');

cms/src/api/guild/services/guild.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
'use strict';
2+
3+
/**
4+
* guild service.
5+
*/
6+
7+
const { createCoreService } = require('@strapi/strapi').factories;
8+
9+
module.exports = createCoreService('api::guild.guild');

cms/src/api/project/content-types/project/schema.json

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
"info": {
55
"singularName": "project",
66
"pluralName": "projects",
7-
"displayName": "Project"
7+
"displayName": "Project",
8+
"description": ""
89
},
910
"options": {
1011
"draftAndPublish": true
@@ -40,31 +41,28 @@
4041
"Complete"
4142
]
4243
},
43-
"guilds_involved": {
44+
"notes": {
4445
"pluginOptions": {
4546
"i18n": {
4647
"localized": true
4748
}
4849
},
49-
"type": "json",
50-
"required": true
50+
"type": "richtext"
5151
},
52-
"contributors": {
53-
"pluginOptions": {
54-
"i18n": {
55-
"localized": true
56-
}
57-
},
58-
"type": "json",
59-
"required": true
52+
"guilds": {
53+
"type": "relation",
54+
"relation": "manyToMany",
55+
"target": "api::guild.guild",
56+
"inversedBy": "projects"
6057
},
61-
"notes": {
58+
"pinned": {
6259
"pluginOptions": {
6360
"i18n": {
6461
"localized": true
6562
}
6663
},
67-
"type": "richtext"
64+
"type": "boolean",
65+
"default": false
6866
}
6967
}
7068
}

0 commit comments

Comments
 (0)