From 706c9127f429d0f74c21bb5b8dac7b0c43eceb74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20FAMIBELLE-PRONZOLA?= Date: Thu, 12 May 2022 06:27:35 +0400 Subject: [PATCH] Update schemas with relations --- src/api/awti/content-types/awti/schema.json | 16 ++++++++++++++++ src/api/komant/content-types/komant/schema.json | 5 +++++ src/api/tek/content-types/tek/schema.json | 16 ++++++++++++++++ 3 files changed, 37 insertions(+) diff --git a/src/api/awti/content-types/awti/schema.json b/src/api/awti/content-types/awti/schema.json index 29506b6..cdc0b94 100644 --- a/src/api/awti/content-types/awti/schema.json +++ b/src/api/awti/content-types/awti/schema.json @@ -29,6 +29,22 @@ }, "slug": { "type": "string" + }, + "teks": { + "type": "relation", + "relation": "manyToMany", + "target": "api::tek.tek", + "inversedBy": "awtis" + }, + "admin_user": { + "type": "relation", + "relation": "oneToOne", + "target": "admin::user" + }, + "user": { + "type": "relation", + "relation": "oneToOne", + "target": "plugin::users-permissions.user" } } } diff --git a/src/api/komant/content-types/komant/schema.json b/src/api/komant/content-types/komant/schema.json index 712cd40..856c881 100644 --- a/src/api/komant/content-types/komant/schema.json +++ b/src/api/komant/content-types/komant/schema.json @@ -19,6 +19,11 @@ "sentAt": { "type": "datetime", "required": true + }, + "user": { + "type": "relation", + "relation": "oneToOne", + "target": "plugin::users-permissions.user" } } } diff --git a/src/api/tek/content-types/tek/schema.json b/src/api/tek/content-types/tek/schema.json index 6bceaf1..c1fa42d 100644 --- a/src/api/tek/content-types/tek/schema.json +++ b/src/api/tek/content-types/tek/schema.json @@ -37,6 +37,22 @@ }, "tradiksyonOtomatik": { "type": "boolean" + }, + "awtis": { + "type": "relation", + "relation": "manyToMany", + "target": "api::awti.awti", + "mappedBy": "teks" + }, + "admin_user": { + "type": "relation", + "relation": "oneToOne", + "target": "admin::user" + }, + "user": { + "type": "relation", + "relation": "oneToOne", + "target": "plugin::users-permissions.user" } } }