diff --git a/validation/applications.json b/validation/applications.json index 026bd47..2bd0192 100644 --- a/validation/applications.json +++ b/validation/applications.json @@ -1,6 +1,87 @@ { "$jsonSchema": { - "required": [], - "properties": {} + "required": [ + "user", + "date", + "admin", + "application", + "application.1", + "application.2", + "application.3", + "application.3.name", + "application.3.adminName1", + "application.3.countryCode", + "application.3.countryName", + "application.3.location", + "application.4", + "application.5", + "application.6", + "application.7", + "application.8", + "application.9", + "application.10" + ], + "properties": { + "user": { + "bsonType": ["int", "long"], + "description": "Telegram ID of user" + }, + "date": { + "bsonType": "date", + "description": "Date when application was accepted" + }, + "admin": { + "bsonType": ["int", "long"], + "description": "Telegram ID of admin that accepted the application" + }, + "application": { + "bsonType": "object" + }, + "application.1": { + "bsonType": "string" + }, + "application.2": { + "bsonType": "date" + }, + "application.3": { + "bsonType": "object" + }, + "application.3.name": { + "bsonType": "string" + }, + "application.3.adminName1": { + "bsonType": "string" + }, + "application.3.countryCode": { + "bsonType": "string" + }, + "application.3.countryName": { + "bsonType": "string" + }, + "application.3.location": { + "bsonType": "array" + }, + "application.4": { + "bsonType": "string" + }, + "application.5": { + "bsonType": "string" + }, + "application.6": { + "bsonType": "string" + }, + "application.7": { + "bsonType": "string" + }, + "application.8": { + "bsonType": "string" + }, + "application.9": { + "bsonType": "string" + }, + "application.10": { + "bsonType": "string" + } + } } } \ No newline at end of file diff --git a/validation/sponsorships.json b/validation/sponsorships.json index 026bd47..3610e48 100644 --- a/validation/sponsorships.json +++ b/validation/sponsorships.json @@ -1,6 +1,43 @@ { "$jsonSchema": { - "required": [], - "properties": {} + "required": [ + "user", + "date", + "admin", + "sponsorship", + "sponsorship.streamer", + "sponsorship.expires", + "sponsorship.proof", + "sponsorship.label" + ], + "properties": { + "user": { + "bsonType": ["int", "long"], + "description": "Telegram ID of user" + }, + "date": { + "bsonType": "date", + "description": "Date when sponsorship was accepted" + }, + "admin": { + "bsonType": ["int", "long"], + "description": "Telegram ID of admin that accepted the sponsorship" + }, + "sponsorship": { + "bsonType": "object" + }, + "sponsorship.streamer": { + "bsonType": "string" + }, + "sponsorship.expires": { + "bsonType": "date" + }, + "sponsorship.proof": { + "bsonType": "binData" + }, + "sponsorship.label": { + "bsonType": "string" + } + } } } \ No newline at end of file diff --git a/validation/tmp.json b/validation/tmp.json new file mode 100644 index 0000000..026bd47 --- /dev/null +++ b/validation/tmp.json @@ -0,0 +1,6 @@ +{ + "$jsonSchema": { + "required": [], + "properties": {} + } +} \ No newline at end of file