62 lines
1.2 KiB
JSON
62 lines
1.2 KiB
JSON
{
|
|
"name": "Message",
|
|
"type": "object",
|
|
"properties": {
|
|
"conversation_id": {
|
|
"type": "string",
|
|
"description": "ID of the conversation"
|
|
},
|
|
"sender_id": {
|
|
"type": "string",
|
|
"description": "ID of the sender"
|
|
},
|
|
"sender_name": {
|
|
"type": "string",
|
|
"description": "Name of the sender"
|
|
},
|
|
"sender_role": {
|
|
"type": "string",
|
|
"enum": [
|
|
"client",
|
|
"vendor",
|
|
"staff",
|
|
"admin"
|
|
],
|
|
"description": "Role of the sender"
|
|
},
|
|
"content": {
|
|
"type": "string",
|
|
"description": "Message content"
|
|
},
|
|
"read_by": {
|
|
"type": "array",
|
|
"description": "Array of user IDs who have read the message",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"attachments": {
|
|
"type": "array",
|
|
"description": "Attached files",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"url": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"required": [
|
|
"conversation_id",
|
|
"sender_name",
|
|
"content"
|
|
]
|
|
} |