From 0d89968455295a6c6cf341612e2dad56984db7ae Mon Sep 17 00:00:00 2001
From: Guilherme Eduardo <gegs23@inf.ufpr.br>
Date: Tue, 3 Sep 2024 11:55:18 -0300
Subject: [PATCH] issue #3: ADD colletion type Projetos in Strapi

---
 .../projeto/content-types/projeto/schema.json | 27 +++++++++++++++++++
 src/api/projeto/controllers/projeto.js        |  9 +++++++
 src/api/projeto/routes/projeto.js             |  9 +++++++
 src/api/projeto/services/projeto.js           |  9 +++++++
 4 files changed, 54 insertions(+)
 create mode 100644 src/api/projeto/content-types/projeto/schema.json
 create mode 100644 src/api/projeto/controllers/projeto.js
 create mode 100644 src/api/projeto/routes/projeto.js
 create mode 100644 src/api/projeto/services/projeto.js

diff --git a/src/api/projeto/content-types/projeto/schema.json b/src/api/projeto/content-types/projeto/schema.json
new file mode 100644
index 000000000..3f8cc1c8d
--- /dev/null
+++ b/src/api/projeto/content-types/projeto/schema.json
@@ -0,0 +1,27 @@
+{
+  "kind": "collectionType",
+  "collectionName": "projetos",
+  "info": {
+    "singularName": "projeto",
+    "pluralName": "projetos",
+    "displayName": " Projeto"
+  },
+  "options": {
+    "draftAndPublish": true
+  },
+  "pluginOptions": {},
+  "attributes": {
+    "Titulo": {
+      "type": "string"
+    },
+    "Status": {
+      "type": "string"
+    },
+    "Parceiro": {
+      "type": "string"
+    },
+    "Descricao": {
+      "type": "richtext"
+    }
+  }
+}
diff --git a/src/api/projeto/controllers/projeto.js b/src/api/projeto/controllers/projeto.js
new file mode 100644
index 000000000..c73f1c6a2
--- /dev/null
+++ b/src/api/projeto/controllers/projeto.js
@@ -0,0 +1,9 @@
+'use strict';
+
+/**
+ * projeto controller
+ */
+
+const { createCoreController } = require('@strapi/strapi').factories;
+
+module.exports = createCoreController('api::projeto.projeto');
diff --git a/src/api/projeto/routes/projeto.js b/src/api/projeto/routes/projeto.js
new file mode 100644
index 000000000..9328922a0
--- /dev/null
+++ b/src/api/projeto/routes/projeto.js
@@ -0,0 +1,9 @@
+'use strict';
+
+/**
+ * projeto router
+ */
+
+const { createCoreRouter } = require('@strapi/strapi').factories;
+
+module.exports = createCoreRouter('api::projeto.projeto');
diff --git a/src/api/projeto/services/projeto.js b/src/api/projeto/services/projeto.js
new file mode 100644
index 000000000..d27b9f062
--- /dev/null
+++ b/src/api/projeto/services/projeto.js
@@ -0,0 +1,9 @@
+'use strict';
+
+/**
+ * projeto service
+ */
+
+const { createCoreService } = require('@strapi/strapi').factories;
+
+module.exports = createCoreService('api::projeto.projeto');
-- 
GitLab