From 639c312ac1182212fd9abcbc55860ee72605dd01 Mon Sep 17 00:00:00 2001 From: profitroll Date: Wed, 21 Dec 2022 10:36:38 +0100 Subject: [PATCH] Added warnings validation --- validation/warnings.json | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/validation/warnings.json b/validation/warnings.json index 026bd47..6712a4a 100644 --- a/validation/warnings.json +++ b/validation/warnings.json @@ -1,6 +1,28 @@ { "$jsonSchema": { - "required": [], - "properties": {} + "required": [ + "user", + "admin", + "date", + "reason" + ], + "properties": { + "user": { + "bsonType": ["int", "long"], + "description": "Telegram ID of user" + }, + "admin": { + "bsonType": ["int", "long"], + "description": "Telegram ID of admin" + }, + "date": { + "bsonType": "date", + "description": "Date and time of getting" + }, + "reason": { + "bsonType": "string", + "description": "Broken rule or admin's comment" + } + } } } \ No newline at end of file