From 6ba92b7bfc2fcb6192d32bf355c5d54e21727c99 Mon Sep 17 00:00:00 2001 From: sagarkoshti1990 Date: Tue, 18 Jan 2022 13:21:14 +0530 Subject: [PATCH] fix: student classId as array and attendance add Unmarked option --- schemas/Attendance.json | 153 ++++++++++----------- schemas/Student.json | 296 ++++++++++++++++++++-------------------- 2 files changed, 222 insertions(+), 227 deletions(-) diff --git a/schemas/Attendance.json b/schemas/Attendance.json index 3e64279c..85d25f69 100644 --- a/schemas/Attendance.json +++ b/schemas/Attendance.json @@ -1,82 +1,79 @@ { - "$schema": "http://json-schema.org/draft-07/schema", - "type": "object", - "properties": { - "Attendance": { - "$ref": "#/definitions/StudentAttendance" - } - }, - "required": [ - "StudentAttendance" - ], - "title": "StudentAttendance", - "definitions": { - "Attendance": { - "$id": "#/properties/StudentAttendance", - "type": "object", - "title": "The Student Attendance schema", - "description": "An attendance record is used to represent the attendance of a student. The attendance record may be at date level or optionally at the subject level, in cases where attendance is marked multiple times a day, once for each subject.", - "required": [], - "properties": { - "attendanceRecordId": { - "$id": "#/properties/attendanceRecordId", - "type": "string" - }, - "studentId": { - "$id": "#/properties/studentId", - "type": "string" - }, - "attendance": { - "$id": "#/properties/attendance", - "type": "string", - "enum" : ["Present", "Absent"] - }, - "attendanceNote": { - "$id": "#/properties/attendanceNote", - "type": "string" - }, - "date": { - "$id": "#/properties/date", - "type": "string", - "format": "date", - "title": "The date for which attendance is to be marked" - }, - "classId": { - "$id": "#/properties/classId", - "type": "string" - }, - "subjectId": { - "$id": "#/properties/subjectId", - "type": "string" - }, - "teacherId": { - "$id": "#/properties/teacherId", - "type": "string" - } - + "$schema": "http://json-schema.org/draft-07/schema", + "type": "object", + "properties": { + "Attendance": { + "$ref": "#/definitions/StudentAttendance" + } + }, + "required": ["StudentAttendance"], + "title": "StudentAttendance", + "definitions": { + "Attendance": { + "$id": "#/properties/StudentAttendance", + "type": "object", + "title": "The Student Attendance schema", + "description": "An attendance record is used to represent the attendance of a student. The attendance record may be at date level or optionally at the subject level, in cases where attendance is marked multiple times a day, once for each subject.", + "required": [], + "properties": { + "attendanceRecordId": { + "$id": "#/properties/attendanceRecordId", + "type": "string" + }, + "studentId": { + "$id": "#/properties/studentId", + "type": "string" + }, + "attendance": { + "$id": "#/properties/attendance", + "type": "string", + "enum": ["Present", "Absent", "Unmarked"] + }, + "attendanceNote": { + "$id": "#/properties/attendanceNote", + "type": "string" + }, + "date": { + "$id": "#/properties/date", + "type": "string", + "format": "date", + "title": "The date for which attendance is to be marked" + }, + "classId": { + "$id": "#/properties/classId", + "type": "string" + }, + "subjectId": { + "$id": "#/properties/subjectId", + "type": "string" + }, + "teacherId": { + "$id": "#/properties/teacherId", + "type": "string" } } - }, - "_osConfig": { - "osComment": [ - "This section contains the OpenSABER specific configuration information", - "privateFields: Optional; list of field names to be encrypted and stored in database", - "signedFields: Optional; list of field names that must be pre-signed", - "indexFields: Optional; list of field names used for creating index. Enclose within braces to indicate it is a composite index. In this definition, (serialNum, schoolCode) is a composite index and schoolName is a single column index.", - "uniqueIndexFields: Optional; list of field names used for creating unique index. Field names must be different from index field name", - "systemFields: Optional; list of fields names used for system standard information like created, updated timestamps and userid" - ], - "privateFields": [], - "signedFields": [], - "indexFields": [], - "uniqueIndexFields": [], - "systemFields": [ - "osCreatedAt", - "osUpdatedAt", - "osCreatedBy", - "osUpdatedBy" - ], - "attestationPolicies": [], - "roles": ["attendance-management"] } - } \ No newline at end of file + }, + "_osConfig": { + "osComment": [ + "This section contains the OpenSABER specific configuration information", + "privateFields: Optional; list of field names to be encrypted and stored in database", + "signedFields: Optional; list of field names that must be pre-signed", + "indexFields: Optional; list of field names used for creating index. Enclose within braces to indicate it is a composite index. In this definition, (serialNum, schoolCode) is a composite index and schoolName is a single column index.", + "uniqueIndexFields: Optional; list of field names used for creating unique index. Field names must be different from index field name", + "systemFields: Optional; list of fields names used for system standard information like created, updated timestamps and userid" + ], + "privateFields": [], + "signedFields": [], + "indexFields": [], + "uniqueIndexFields": [], + "systemFields": [ + "osCreatedAt", + "osUpdatedAt", + "osCreatedBy", + "osUpdatedBy" + ], + "attestationPolicies": [], + "roles": ["attendance-management"] + } +} diff --git a/schemas/Student.json b/schemas/Student.json index ed036108..4a6a815a 100644 --- a/schemas/Student.json +++ b/schemas/Student.json @@ -1,153 +1,151 @@ { - "$schema": "http://json-schema.org/draft-07/schema", - "type": "object", - "properties": { - "Student": { - "$ref": "#/definitions/Student" - } - }, - "required": [ - "Student" - ], - "title": "Student", - "definitions": { - "Student": { - "$id": "#/properties/Student", - "type": "object", - "title": "The Student schema", - "required": [], - "properties": { - "studentId": { - "$id": "#/properties/studentId", - "type": "string" - }, - "firstName": { - "$id": "#/properties/firstName", - "type": "string" - }, - "lastName": { - "$id": "#/properties/lastName", - "type": "string" - }, - "refStudentId": { - "$id": "#/properties/refStudentId", - "type": "string" - }, - "admissionNo": { - "$id": "#/properties/admissionNo", - "type": "string" - }, - "currentClassID": { - "$id": "#/properties/currentClassID", - "type": "string" - }, - "fatherName": { - "$id": "#/properties/fatherName", - "type": "string" - }, - "email": { - "$id": "#/properties/email", - "type": "string", - "format": "email", - "title": "Email" - }, - "aadhaar": { - "$id": "#/properties/aadhaar", - "type": "string" - }, - "motherName": { - "$id": "#/properties/motherName", - "type": "string" - }, - "contactNumber": { - "$id": "#/properties/contactNumber", - "type": "integer" - }, - "gender": { - "$id": "#/properties/gender", - "type": "string" - }, - "socialCategory": { - "$id": "#/properties/socialCategory", - "type": "string" - }, - "iscwsn": { - "$id": "#/properties/iscwsn", - "type": "string" - }, - "religion": { - "$id": "#/properties/religion", - "type": "string" - }, - "singleGirl": { - "$id": "#/properties/singleGirl", - "type": "string" - }, - "weight": { - "$id": "#/properties/weight", - "type": "string" - }, - "height": { - "$id": "#/properties/height", - "type": "string" - }, - "bloodGroup": { - "$id": "#/properties/bloodGroup", - "type": "string" - }, - "birthDate": { - "$id": "#/properties/birthDate", - "type": "string" - }, - "homeless": { - "$id": "#/properties/homeless", - "type": "string" - }, - "bpl": { - "$id": "#/properties/bpl", - "type": "string" - }, - "migrant": { - "$id": "#/properties/migrant", - "type": "string" - }, - "schoolId": { - "$id": "#/properties/schoolId", - "type": "string" - }, - "classId": { - "$id": "#/properties/classId", - "type": "string" - }, - "status": { - "$id": "#/properties/status", - "type": "string" - } - + "$schema": "http://json-schema.org/draft-07/schema", + "type": "object", + "properties": { + "Student": { + "$ref": "#/definitions/Student" + } + }, + "required": ["Student"], + "title": "Student", + "definitions": { + "Student": { + "$id": "#/properties/Student", + "type": "object", + "title": "The Student schema", + "required": [], + "properties": { + "studentId": { + "$id": "#/properties/studentId", + "type": "string" + }, + "firstName": { + "$id": "#/properties/firstName", + "type": "string" + }, + "lastName": { + "$id": "#/properties/lastName", + "type": "string" + }, + "refStudentId": { + "$id": "#/properties/refStudentId", + "type": "string" + }, + "admissionNo": { + "$id": "#/properties/admissionNo", + "type": "string" + }, + "currentClassID": { + "$id": "#/properties/currentClassID", + "type": "string" + }, + "fatherName": { + "$id": "#/properties/fatherName", + "type": "string" + }, + "email": { + "$id": "#/properties/email", + "type": "string", + "format": "email", + "title": "Email" + }, + "aadhaar": { + "$id": "#/properties/aadhaar", + "type": "string" + }, + "motherName": { + "$id": "#/properties/motherName", + "type": "string" + }, + "contactNumber": { + "$id": "#/properties/contactNumber", + "type": "integer" + }, + "gender": { + "$id": "#/properties/gender", + "type": "string" + }, + "socialCategory": { + "$id": "#/properties/socialCategory", + "type": "string" + }, + "iscwsn": { + "$id": "#/properties/iscwsn", + "type": "string" + }, + "religion": { + "$id": "#/properties/religion", + "type": "string" + }, + "singleGirl": { + "$id": "#/properties/singleGirl", + "type": "string" + }, + "weight": { + "$id": "#/properties/weight", + "type": "string" + }, + "height": { + "$id": "#/properties/height", + "type": "string" + }, + "bloodGroup": { + "$id": "#/properties/bloodGroup", + "type": "string" + }, + "birthDate": { + "$id": "#/properties/birthDate", + "type": "string" + }, + "homeless": { + "$id": "#/properties/homeless", + "type": "string" + }, + "bpl": { + "$id": "#/properties/bpl", + "type": "string" + }, + "migrant": { + "$id": "#/properties/migrant", + "type": "string" + }, + "schoolId": { + "$id": "#/properties/schoolId", + "type": "string" + }, + "classId": { + "$id": "#/properties/classId", + "type": "array", + "title": "Array of classids having this student" + }, + "status": { + "$id": "#/properties/status", + "type": "string" } } - }, - "_osConfig": { - "osComment": [ - "This section contains the OpenSABER specific configuration information", - "privateFields: Optional; list of field names to be encrypted and stored in database", - "signedFields: Optional; list of field names that must be pre-signed", - "indexFields: Optional; list of field names used for creating index. Enclose within braces to indicate it is a composite index. In this definition, (serialNum, schoolCode) is a composite index and schoolName is a single column index.", - "uniqueIndexFields: Optional; list of field names used for creating unique index. Field names must be different from index field name", - "systemFields: Optional; list of fields names used for system standard information like created, updated timestamps and userid" - ], - "privateFields": [], - "signedFields": [], - "indexFields": [], - "uniqueIndexFields": [], - "systemFields": [ - "osCreatedAt", - "osUpdatedAt", - "osCreatedBy", - "osUpdatedBy" - ], - "attestationPolicies": [], - "subjectJsonPath": "email", - "enableLogin": true } - } \ No newline at end of file + }, + "_osConfig": { + "osComment": [ + "This section contains the OpenSABER specific configuration information", + "privateFields: Optional; list of field names to be encrypted and stored in database", + "signedFields: Optional; list of field names that must be pre-signed", + "indexFields: Optional; list of field names used for creating index. Enclose within braces to indicate it is a composite index. In this definition, (serialNum, schoolCode) is a composite index and schoolName is a single column index.", + "uniqueIndexFields: Optional; list of field names used for creating unique index. Field names must be different from index field name", + "systemFields: Optional; list of fields names used for system standard information like created, updated timestamps and userid" + ], + "privateFields": [], + "signedFields": [], + "indexFields": [], + "uniqueIndexFields": [], + "systemFields": [ + "osCreatedAt", + "osUpdatedAt", + "osCreatedBy", + "osUpdatedBy" + ], + "attestationPolicies": [], + "subjectJsonPath": "email", + "enableLogin": true + } +}