Skip to content

Commit

Permalink
🚀 (models): add models for base functions
Browse files Browse the repository at this point in the history
  • Loading branch information
jhasselberg committed Jan 5, 2025
1 parent 813ea01 commit d5ace14
Show file tree
Hide file tree
Showing 18 changed files with 381 additions and 1 deletion.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,6 @@
},
"strapi": {
"uuid": "c493cc44-f350-437f-bd6e-f0248d2e9d50"
}
},
"packageManager": "pnpm@9.15.1+sha512.1acb565e6193efbebda772702950469150cf12bcc764262e7587e71d19dc98a423dff9536e57ea44c49bdf790ff694e83c27be5faa23d67e0c033b583be4bfcf"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"kind": "collectionType",
"collectionName": "cv_education_experiences",
"info": {
"singularName": "cv-education-experience",
"pluralName": "cv-education-experiences",
"displayName": "CV Education Experience"
},
"options": {
"draftAndPublish": true
},
"pluginOptions": {},
"attributes": {
"startedAt": {
"type": "date"
},
"finishedAt": {
"type": "date"
},
"title": {
"type": "string"
},
"description": {
"type": "text"
},
"reference_tags": {
"type": "relation",
"relation": "manyToMany",
"target": "api::reference-tag.reference-tag",
"inversedBy": "cv_education_experiences"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* cv-education-experience controller
*/

import { factories } from '@strapi/strapi'

export default factories.createCoreController('api::cv-education-experience.cv-education-experience');
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* cv-education-experience router
*/

import { factories } from '@strapi/strapi';

export default factories.createCoreRouter('api::cv-education-experience.cv-education-experience');
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* cv-education-experience service
*/

import { factories } from '@strapi/strapi';

export default factories.createCoreService('api::cv-education-experience.cv-education-experience');
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"kind": "collectionType",
"collectionName": "cv_work_experiences",
"info": {
"singularName": "cv-work-experience",
"pluralName": "cv-work-experiences",
"displayName": "CV Work Experience"
},
"options": {
"draftAndPublish": true
},
"pluginOptions": {},
"attributes": {
"startedAt": {
"type": "date"
},
"finishedAt": {
"type": "date"
},
"title": {
"type": "string"
},
"description": {
"type": "text"
},
"reference_tags": {
"type": "relation",
"relation": "manyToMany",
"target": "api::reference-tag.reference-tag",
"inversedBy": "cv_work_experiences"
}
}
}
7 changes: 7 additions & 0 deletions src/api/cv-work-experience/controllers/cv-work-experience.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* cv-work-experience controller
*/

import { factories } from '@strapi/strapi'

export default factories.createCoreController('api::cv-work-experience.cv-work-experience');
7 changes: 7 additions & 0 deletions src/api/cv-work-experience/routes/cv-work-experience.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* cv-work-experience router
*/

import { factories } from '@strapi/strapi';

export default factories.createCoreRouter('api::cv-work-experience.cv-work-experience');
7 changes: 7 additions & 0 deletions src/api/cv-work-experience/services/cv-work-experience.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* cv-work-experience service
*/

import { factories } from '@strapi/strapi';

export default factories.createCoreService('api::cv-work-experience.cv-work-experience');
39 changes: 39 additions & 0 deletions src/api/post/content-types/post/schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"kind": "collectionType",
"collectionName": "posts",
"info": {
"singularName": "post",
"pluralName": "posts",
"displayName": "Blogpost",
"description": ""
},
"options": {
"draftAndPublish": true
},
"pluginOptions": {},
"attributes": {
"title": {
"type": "string",
"required": true,
"unique": true
},
"content": {
"type": "richtext",
"required": true
},
"cover": {
"type": "media",
"multiple": false,
"required": true,
"allowedTypes": [
"images"
]
},
"reference_tags": {
"type": "relation",
"relation": "manyToMany",
"target": "api::reference-tag.reference-tag",
"inversedBy": "posts"
}
}
}
7 changes: 7 additions & 0 deletions src/api/post/controllers/post.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* post controller
*/

import { factories } from '@strapi/strapi'

export default factories.createCoreController('api::post.post');
7 changes: 7 additions & 0 deletions src/api/post/routes/post.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* post router
*/

import { factories } from '@strapi/strapi';

export default factories.createCoreRouter('api::post.post');
7 changes: 7 additions & 0 deletions src/api/post/services/post.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* post service
*/

import { factories } from '@strapi/strapi';

export default factories.createCoreService('api::post.post');
40 changes: 40 additions & 0 deletions src/api/reference-tag/content-types/reference-tag/schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"kind": "collectionType",
"collectionName": "reference_tags",
"info": {
"singularName": "reference-tag",
"pluralName": "reference-tags",
"displayName": "Reference Tag",
"description": ""
},
"options": {
"draftAndPublish": true
},
"pluginOptions": {},
"attributes": {
"title": {
"type": "string"
},
"link": {
"type": "string"
},
"posts": {
"type": "relation",
"relation": "manyToMany",
"target": "api::post.post",
"mappedBy": "reference_tags"
},
"cv_education_experiences": {
"type": "relation",
"relation": "manyToMany",
"target": "api::cv-education-experience.cv-education-experience",
"mappedBy": "reference_tags"
},
"cv_work_experiences": {
"type": "relation",
"relation": "manyToMany",
"target": "api::cv-work-experience.cv-work-experience",
"mappedBy": "reference_tags"
}
}
}
7 changes: 7 additions & 0 deletions src/api/reference-tag/controllers/reference-tag.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* reference-tag controller
*/

import { factories } from '@strapi/strapi'

export default factories.createCoreController('api::reference-tag.reference-tag');
7 changes: 7 additions & 0 deletions src/api/reference-tag/routes/reference-tag.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* reference-tag router
*/

import { factories } from '@strapi/strapi';

export default factories.createCoreRouter('api::reference-tag.reference-tag');
7 changes: 7 additions & 0 deletions src/api/reference-tag/services/reference-tag.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* reference-tag service
*/

import { factories } from '@strapi/strapi';

export default factories.createCoreService('api::reference-tag.reference-tag');
Loading

0 comments on commit d5ace14

Please sign in to comment.