From ca91ceb3544e52127bde6f6e219fd0b19b59f398 Mon Sep 17 00:00:00 2001
From: Guilherme Eduardo <gegs23@inf.ufpr.br>
Date: Mon, 28 Oct 2024 15:46:33 -0300
Subject: [PATCH] Issue #10: UPDATE including identifier in contentType of
 Projects and about in strapi

---
 src/api/noticia/content-types/noticia/schema.json | 6 ++++--
 src/api/projeto/content-types/projeto/schema.json | 8 +++++++-
 src/api/sobre/content-types/sobre/schema.json     | 8 +++++++-
 types/generated/contentTypes.d.ts                 | 8 ++++++--
 4 files changed, 24 insertions(+), 6 deletions(-)

diff --git a/src/api/noticia/content-types/noticia/schema.json b/src/api/noticia/content-types/noticia/schema.json
index 8b51e63b9..bf111ca2b 100644
--- a/src/api/noticia/content-types/noticia/schema.json
+++ b/src/api/noticia/content-types/noticia/schema.json
@@ -32,7 +32,8 @@
       "target": "api::author.author"
     },
     "Data": {
-      "type": "date"
+      "type": "date",
+      "required": true
     },
     "Descricao": {
       "type": "richtext"
@@ -42,7 +43,8 @@
     },
     "Identificador": {
       "type": "uid",
-      "targetField": "Titulo"
+      "targetField": "Titulo",
+      "required": true
     }
   }
 }
diff --git a/src/api/projeto/content-types/projeto/schema.json b/src/api/projeto/content-types/projeto/schema.json
index d170dda0e..1c62fac9c 100644
--- a/src/api/projeto/content-types/projeto/schema.json
+++ b/src/api/projeto/content-types/projeto/schema.json
@@ -4,7 +4,8 @@
   "info": {
     "singularName": "projeto",
     "pluralName": "projetos",
-    "displayName": "Projeto"
+    "displayName": "Projeto",
+    "description": ""
   },
   "options": {
     "draftAndPublish": true
@@ -22,6 +23,11 @@
     },
     "Descricao": {
       "type": "richtext"
+    },
+    "Identificador": {
+      "type": "uid",
+      "targetField": "Titulo",
+      "required": true
     }
   }
 }
diff --git a/src/api/sobre/content-types/sobre/schema.json b/src/api/sobre/content-types/sobre/schema.json
index fdcb55898..ece45e786 100644
--- a/src/api/sobre/content-types/sobre/schema.json
+++ b/src/api/sobre/content-types/sobre/schema.json
@@ -4,7 +4,8 @@
   "info": {
     "singularName": "sobre",
     "pluralName": "sobres",
-    "displayName": "Sobre"
+    "displayName": "Sobre",
+    "description": ""
   },
   "options": {
     "draftAndPublish": true
@@ -16,6 +17,11 @@
     },
     "Descricao": {
       "type": "richtext"
+    },
+    "Identificador": {
+      "type": "uid",
+      "targetField": "Titulo",
+      "required": true
     }
   }
 }
diff --git a/types/generated/contentTypes.d.ts b/types/generated/contentTypes.d.ts
index 25eed541a..fbf3e2c74 100644
--- a/types/generated/contentTypes.d.ts
+++ b/types/generated/contentTypes.d.ts
@@ -626,10 +626,10 @@ export interface ApiNoticiaNoticia extends Struct.CollectionTypeSchema {
     Titulo: Schema.Attribute.String;
     Imagem: Schema.Attribute.Media<'images' | 'files' | 'videos' | 'audios'>;
     Autor: Schema.Attribute.Relation<'oneToOne', 'api::author.author'>;
-    Data: Schema.Attribute.Date;
+    Data: Schema.Attribute.Date & Schema.Attribute.Required;
     Descricao: Schema.Attribute.RichText;
     Gravata: Schema.Attribute.Text;
-    Identificador: Schema.Attribute.UID<'Titulo'>;
+    Identificador: Schema.Attribute.UID<'Titulo'> & Schema.Attribute.Required;
     createdAt: Schema.Attribute.DateTime;
     updatedAt: Schema.Attribute.DateTime;
     publishedAt: Schema.Attribute.DateTime;
@@ -710,6 +710,7 @@ export interface ApiProjetoProjeto extends Struct.CollectionTypeSchema {
     singularName: 'projeto';
     pluralName: 'projetos';
     displayName: 'Projeto';
+    description: '';
   };
   options: {
     draftAndPublish: true;
@@ -719,6 +720,7 @@ export interface ApiProjetoProjeto extends Struct.CollectionTypeSchema {
     Estado: Schema.Attribute.String;
     Parceiro: Schema.Attribute.String;
     Descricao: Schema.Attribute.RichText;
+    Identificador: Schema.Attribute.UID<'Titulo'> & Schema.Attribute.Required;
     createdAt: Schema.Attribute.DateTime;
     updatedAt: Schema.Attribute.DateTime;
     publishedAt: Schema.Attribute.DateTime;
@@ -740,6 +742,7 @@ export interface ApiSobreSobre extends Struct.SingleTypeSchema {
     singularName: 'sobre';
     pluralName: 'sobres';
     displayName: 'Sobre';
+    description: '';
   };
   options: {
     draftAndPublish: true;
@@ -747,6 +750,7 @@ export interface ApiSobreSobre extends Struct.SingleTypeSchema {
   attributes: {
     Titulo: Schema.Attribute.String;
     Descricao: Schema.Attribute.RichText;
+    Identificador: Schema.Attribute.UID<'Titulo'> & Schema.Attribute.Required;
     createdAt: Schema.Attribute.DateTime;
     updatedAt: Schema.Attribute.DateTime;
     publishedAt: Schema.Attribute.DateTime;
-- 
GitLab