Change direct message schema
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "harmony-back",
|
||||
"version": "0.11.2",
|
||||
"version": "0.11.3",
|
||||
"private": true,
|
||||
"description": "A Strapi application",
|
||||
"scripts": {
|
||||
|
||||
@@ -4,7 +4,8 @@
|
||||
"info": {
|
||||
"singularName": "conversation",
|
||||
"pluralName": "conversations",
|
||||
"displayName": "Conversation"
|
||||
"displayName": "Conversation",
|
||||
"description": ""
|
||||
},
|
||||
"options": {
|
||||
"draftAndPublish": false
|
||||
@@ -24,7 +25,8 @@
|
||||
"direct_messages": {
|
||||
"type": "relation",
|
||||
"relation": "oneToMany",
|
||||
"target": "api::direct-message.direct-message"
|
||||
"target": "api::direct-message.direct-message",
|
||||
"mappedBy": "conversation"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,8 @@
|
||||
"info": {
|
||||
"singularName": "direct-message",
|
||||
"pluralName": "direct-messages",
|
||||
"displayName": "DirectMessage"
|
||||
"displayName": "DirectMessage",
|
||||
"description": ""
|
||||
},
|
||||
"options": {
|
||||
"draftAndPublish": false
|
||||
@@ -17,15 +18,16 @@
|
||||
"fileUrl": {
|
||||
"type": "string"
|
||||
},
|
||||
"user1": {
|
||||
"author": {
|
||||
"type": "relation",
|
||||
"relation": "oneToOne",
|
||||
"target": "plugin::users-permissions.user"
|
||||
},
|
||||
"user2": {
|
||||
"conversation": {
|
||||
"type": "relation",
|
||||
"relation": "oneToOne",
|
||||
"target": "plugin::users-permissions.user"
|
||||
"relation": "manyToOne",
|
||||
"target": "api::conversation.conversation",
|
||||
"inversedBy": "direct_messages"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
"name": "Apache 2.0",
|
||||
"url": "https://www.apache.org/licenses/LICENSE-2.0.html"
|
||||
},
|
||||
"x-generation-date": "2025-05-06T21:44:09.671Z"
|
||||
"x-generation-date": "2025-05-08T17:07:50.652Z"
|
||||
},
|
||||
"x-strapi-config": {
|
||||
"plugins": [
|
||||
@@ -33665,7 +33665,7 @@
|
||||
"fileUrl": {
|
||||
"type": "string"
|
||||
},
|
||||
"user1": {
|
||||
"author": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
@@ -33676,111 +33676,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"user2": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "number"
|
||||
},
|
||||
"documentId": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"createdAt": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"updatedAt": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"publishedAt": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"createdBy": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "number"
|
||||
},
|
||||
"documentId": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"updatedBy": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "number"
|
||||
},
|
||||
"documentId": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"locale": {
|
||||
"type": "string"
|
||||
},
|
||||
"localizations": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "number"
|
||||
},
|
||||
"documentId": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"createdAt": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"updatedAt": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"publishedAt": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"createdBy": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "number"
|
||||
},
|
||||
"documentId": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"updatedBy": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "number"
|
||||
},
|
||||
"documentId": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"locale": {
|
||||
"type": "string"
|
||||
},
|
||||
"localizations": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"conversation": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
@@ -33877,6 +33773,110 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"createdAt": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"updatedAt": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"publishedAt": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"createdBy": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "number"
|
||||
},
|
||||
"documentId": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"updatedBy": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "number"
|
||||
},
|
||||
"documentId": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"locale": {
|
||||
"type": "string"
|
||||
},
|
||||
"localizations": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "number"
|
||||
},
|
||||
"documentId": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"createdAt": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"updatedAt": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"publishedAt": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"createdBy": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "number"
|
||||
},
|
||||
"documentId": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"updatedBy": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "number"
|
||||
},
|
||||
"documentId": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"locale": {
|
||||
"type": "string"
|
||||
},
|
||||
"localizations": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "number"
|
||||
},
|
||||
"documentId": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -33907,7 +33907,7 @@
|
||||
"fileUrl": {
|
||||
"type": "string"
|
||||
},
|
||||
"user1": {
|
||||
"author": {
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "integer"
|
||||
@@ -33918,7 +33918,7 @@
|
||||
],
|
||||
"example": "string or id"
|
||||
},
|
||||
"user2": {
|
||||
"conversation": {
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "integer"
|
||||
@@ -34000,7 +34000,7 @@
|
||||
"fileUrl": {
|
||||
"type": "string"
|
||||
},
|
||||
"user1": {
|
||||
"author": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
@@ -36532,7 +36532,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"user2": {
|
||||
"conversation": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
@@ -36540,62 +36540,6 @@
|
||||
},
|
||||
"documentId": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"createdAt": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"updatedAt": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"publishedAt": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"createdBy": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "number"
|
||||
},
|
||||
"documentId": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"updatedBy": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "number"
|
||||
},
|
||||
"documentId": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"locale": {
|
||||
"type": "string"
|
||||
},
|
||||
"localizations": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "number"
|
||||
},
|
||||
"documentId": {
|
||||
"type": "string"
|
||||
},
|
||||
"content": {
|
||||
"type": "string"
|
||||
},
|
||||
"fileUrl": {
|
||||
"type": "string"
|
||||
},
|
||||
"user1": {
|
||||
"type": "object",
|
||||
@@ -36619,6 +36563,45 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"direct_messages": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "number"
|
||||
},
|
||||
"documentId": {
|
||||
"type": "string"
|
||||
},
|
||||
"content": {
|
||||
"type": "string"
|
||||
},
|
||||
"fileUrl": {
|
||||
"type": "string"
|
||||
},
|
||||
"author": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "number"
|
||||
},
|
||||
"documentId": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"conversation": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "number"
|
||||
},
|
||||
"documentId": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"createdAt": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
@@ -36672,6 +36655,110 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"createdAt": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"updatedAt": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"publishedAt": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"createdBy": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "number"
|
||||
},
|
||||
"documentId": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"updatedBy": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "number"
|
||||
},
|
||||
"documentId": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"locale": {
|
||||
"type": "string"
|
||||
},
|
||||
"localizations": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "number"
|
||||
},
|
||||
"documentId": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"createdAt": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"updatedAt": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"publishedAt": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"createdBy": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "number"
|
||||
},
|
||||
"documentId": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"updatedBy": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "number"
|
||||
},
|
||||
"documentId": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"locale": {
|
||||
"type": "string"
|
||||
},
|
||||
"localizations": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "number"
|
||||
},
|
||||
"documentId": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
18
types/generated/contentTypes.d.ts
vendored
18
types/generated/contentTypes.d.ts
vendored
@@ -682,6 +682,7 @@ export interface ApiConversationConversation
|
||||
extends Struct.CollectionTypeSchema {
|
||||
collectionName: 'conversations';
|
||||
info: {
|
||||
description: '';
|
||||
displayName: 'Conversation';
|
||||
pluralName: 'conversations';
|
||||
singularName: 'conversation';
|
||||
@@ -722,6 +723,7 @@ export interface ApiDirectMessageDirectMessage
|
||||
extends Struct.CollectionTypeSchema {
|
||||
collectionName: 'direct_messages';
|
||||
info: {
|
||||
description: '';
|
||||
displayName: 'DirectMessage';
|
||||
pluralName: 'direct-messages';
|
||||
singularName: 'direct-message';
|
||||
@@ -730,7 +732,15 @@ export interface ApiDirectMessageDirectMessage
|
||||
draftAndPublish: false;
|
||||
};
|
||||
attributes: {
|
||||
author: Schema.Attribute.Relation<
|
||||
'oneToOne',
|
||||
'plugin::users-permissions.user'
|
||||
>;
|
||||
content: Schema.Attribute.String;
|
||||
conversation: Schema.Attribute.Relation<
|
||||
'manyToOne',
|
||||
'api::conversation.conversation'
|
||||
>;
|
||||
createdAt: Schema.Attribute.DateTime;
|
||||
createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
|
||||
Schema.Attribute.Private;
|
||||
@@ -745,14 +755,6 @@ export interface ApiDirectMessageDirectMessage
|
||||
updatedAt: Schema.Attribute.DateTime;
|
||||
updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
|
||||
Schema.Attribute.Private;
|
||||
user1: Schema.Attribute.Relation<
|
||||
'oneToOne',
|
||||
'plugin::users-permissions.user'
|
||||
>;
|
||||
user2: Schema.Attribute.Relation<
|
||||
'oneToOne',
|
||||
'plugin::users-permissions.user'
|
||||
>;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user