diff --git a/config/schemas/student.json b/config/schemas/student.json index 0646110bc61aabb5eeaf2e8c14c480a90f4e9548..7a16e49e012a01c756f762dfbd5081b65900edeb 100644 --- a/config/schemas/student.json +++ b/config/schemas/student.json @@ -1,42 +1,42 @@ { "$schema": "http://json-schema.org/draft-07/schema", "type": "object", - "properties": { "Student": { "$ref": "#/definitions/Student" } }, + "properties": { + "Student": { + "$ref": "#/definitions/Student" + } + }, "required": ["Student"], "title": "Student", "definitions": { "Student": { "$id": "#/properties/Student", "type": "object", - "title": "Studentschema", - "required": ["name", "phoneNumber", "email", "school"], - "uniqueIndexFields": ["phoneNumber"], + "title": "Student schema", + "required": ["name", "courseKey", "email", "username", "StudentKey", "centerKey", "address", "rollNo", "dob"], + "uniqueIndexFields": ["username"], "properties": { "name": { "type": "string" }, - "phoneNumber": { "type": "string" }, + "courseKey": { "type": "string" }, "email": { "type": "string" }, - "school": { "type": "string" } + "username": { "type": "string" }, + "StudentKey": { "type": "string" }, + "centerKey": { "type": "string" }, + "address": { "type": "string" }, + "rollNo": { "type": "string" }, + "dob": { "type": "string" } } } }, "_osConfig": { "ownershipAttributes": [ { - "email": "/email", - "mobile": "/phoneNumber", - "userId": "/phoneNumber" + "email": "/username", + "mobile": "/username", + "userId": "/username" } ], "inviteRoles": ["anonymous"], - "attestationAttributes": ["school"], - "attestationPolicies": [ - { - "property": "school", - "paths": ["$.school"], - "type": "MANUAL", - "attestorEntity": "Teacher", - "conditions": "(ATTESTOR#$.school#.contains(REQUESTER#$.school#))" - } - ] + "roles": ["anonymous"] } } diff --git a/config/schemas/teacher.json b/config/schemas/teacher.json deleted file mode 100644 index cb5650740257af4c7684559c6dd23b5b92d3eadc..0000000000000000000000000000000000000000 --- a/config/schemas/teacher.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema", - "type": "object", - "properties": { - "Teacher": { - "$ref": "#/definitions/Teacher" - } - }, - "required": ["Teacher"], - "title": "Teacher", - "definitions": { - "Teacher": { - "$id": "#/properties/Teacher", - "type": "object", - "title": "Teacher schema", - "required": ["name", "phoneNumber", "email", "school"], - "uniqueIndexFields": ["phoneNumber"], - "properties": { - "name": { "type": "string" }, - "phoneNumber": { "type": "string" }, - "email": { "type": "string" }, - "school": { "type": "string" }, - "subject": { - "type": "string", - "enum": [ - "Math", - "Hindi", - "English", - "History", - "Geography", - "Physics", - "Chemistry", - "Biology" - ] - } - } - } - }, - "_osConfig": { - "ownershipAttributes": [ - { - "email": "/email", - "mobile": "/phoneNumber", - "userId": "/phoneNumber" - } - ], - "inviteRoles": ["anonymous"], - "roles": ["anonymous"] - } -} diff --git a/config/schemas/tutor.json b/config/schemas/tutor.json new file mode 100644 index 0000000000000000000000000000000000000000..a71cb1de591364c2c70352e11d0513f04b19c1fb --- /dev/null +++ b/config/schemas/tutor.json @@ -0,0 +1,41 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema", + "type": "object", + "properties": { + "Tutor": { + "$ref": "#/definitions/Tutor" + } + }, + "required": ["Tutor"], + "title": "Tutor", + "definitions": { + "Tutor": { + "$id": "#/properties/Tutor", + "type": "object", + "title": "Tutor schema", + "required": ["name", "phoneNumber", "email", "username", "tutorKey", "centerKey", "qualifications", "aadhaarNo"], + "uniqueIndexFields": ["username"], + "properties": { + "name": { "type": "string" }, + "phoneNumber": { "type": "string" }, + "email": { "type": "string" }, + "username": { "type": "string" }, + "tutorKey": { "type": "string" }, + "centerKey": { "type": "string" }, + "qualifications": { "type": "string" }, + "aadhaarNo": { "type": "string" } + } + } + }, + "_osConfig": { + "ownershipAttributes": [ + { + "email": "/email", + "mobile": "/phoneNumber", + "userId": "/username" + } + ], + "inviteRoles": ["anonymous"], + "roles": ["anonymous"] + } +}