123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303 |
- //
- // AssessmentListModel.swift
- // LMS
- //
- // Created by Suraj Kumar Mandal on 13/09/22.
- //
- // let assessmentList = try? newJSONDecoder().decode(AssessmentList.self, from: jsonData)
- import Foundation
- // MARK: - AssessmentListModel
- class AssessmentListModel: Codable {
- var createdBy, createdDate, lastModifiedBy, lastModifiedDate: String?
- var id: Int?
- var assessment: Assessment?
- var batches: [AssessmentBatch]?
- var status, comments, startDateTime, endDateTime: String?
- var source, scheduleAssessmentCreatorName, scheduleAssessmentApproverName, scheduleAssessmentApprovedDateTime: JSONNull?
- var attempted: Bool?
- init(createdBy: String?, createdDate: String?, lastModifiedBy: String?, lastModifiedDate: String?, id: Int?, assessment: Assessment?, batches: [AssessmentBatch]?, status: String?, comments: String?, startDateTime: String?, endDateTime: String?, source: JSONNull?, scheduleAssessmentCreatorName: JSONNull?, scheduleAssessmentApproverName: JSONNull?, scheduleAssessmentApprovedDateTime: JSONNull?, attempted: Bool?) {
- self.createdBy = createdBy
- self.createdDate = createdDate
- self.lastModifiedBy = lastModifiedBy
- self.lastModifiedDate = lastModifiedDate
- self.id = id
- self.assessment = assessment
- self.batches = batches
- self.status = status
- self.comments = comments
- self.startDateTime = startDateTime
- self.endDateTime = endDateTime
- self.source = source
- self.scheduleAssessmentCreatorName = scheduleAssessmentCreatorName
- self.scheduleAssessmentApproverName = scheduleAssessmentApproverName
- self.scheduleAssessmentApprovedDateTime = scheduleAssessmentApprovedDateTime
- self.attempted = attempted
- }
- }
- // MARK: - Assessment
- class Assessment: Codable {
- var createdBy, createdDate, lastModifiedBy, lastModifiedDate: String?
- var id: Int?
- var intervention: AssessmentIntervention?
- var level: AssessmentLevel?
- var unit: AssessmentUnit?
- var lesson: AssessmentLesson?
- var type, mode, name, status: String?
- var comments: String?
- var totalMarks, negativeMarkPerQuestion, totalQuestions: Int?
- var fileId, fileType: String?
- var assessmentCreatorName, assessmentApproverName, assessmentApprovedDateTime: JSONNull?
- var negative, randomized: Bool?
- init(createdBy: String?, createdDate: String?, lastModifiedBy: String?, lastModifiedDate: String?, id: Int?, intervention: AssessmentIntervention?, level: AssessmentLevel?, unit: AssessmentUnit?, lesson: AssessmentLesson?, type: String?, mode: String?, name: String?, status: String?, comments: String?, totalMarks: Int?, negativeMarkPerQuestion: Int?, totalQuestions: Int?, fileId: String?, fileType: String?, assessmentCreatorName: JSONNull?, assessmentApproverName: JSONNull?, assessmentApprovedDateTime: JSONNull?, negative: Bool?, randomized: Bool?) {
- self.createdBy = createdBy
- self.createdDate = createdDate
- self.lastModifiedBy = lastModifiedBy
- self.lastModifiedDate = lastModifiedDate
- self.id = id
- self.intervention = intervention
- self.level = level
- self.unit = unit
- self.lesson = lesson
- self.type = type
- self.mode = mode
- self.name = name
- self.status = status
- self.comments = comments
- self.totalMarks = totalMarks
- self.negativeMarkPerQuestion = negativeMarkPerQuestion
- self.totalQuestions = totalQuestions
- self.fileId = fileId
- self.fileType = fileType
- self.assessmentCreatorName = assessmentCreatorName
- self.assessmentApproverName = assessmentApproverName
- self.assessmentApprovedDateTime = assessmentApprovedDateTime
- self.negative = negative
- self.randomized = randomized
- }
- }
- // MARK: - AssessmentIntervention
- class AssessmentIntervention: Codable {
- var id, incrementor: Int?
- var interventionId, interventionName: String?
- var interventionLevels: [String]?
- var beneficiaryIds: [Int]?
- var deleted, active: Bool?
- var status: String?
- var interventionSchoolMappings, mappedProgramHeads: JSONNull?
- var levels: [Level]?
- init(id: Int?, incrementor: Int?, interventionId: String?, interventionName: String?, interventionLevels: [String]?, beneficiaryIds: [Int]?, deleted: Bool?, active: Bool?, status: String?, interventionSchoolMappings: JSONNull?, mappedProgramHeads: JSONNull?, levels: [Level]?) {
- self.id = id
- self.incrementor = incrementor
- self.interventionId = interventionId
- self.interventionName = interventionName
- self.interventionLevels = interventionLevels
- self.beneficiaryIds = beneficiaryIds
- self.deleted = deleted
- self.active = active
- self.status = status
- self.interventionSchoolMappings = interventionSchoolMappings
- self.mappedProgramHeads = mappedProgramHeads
- self.levels = levels
- }
- }
- // MARK: - AssessmentLevel
- class AssessmentLevel: Codable {
- var id, interventionTableId: Int?
- var interventionLevels: String?
- init(id: Int?, interventionTableId: Int?, interventionLevels: String?) {
- self.id = id
- self.interventionTableId = interventionTableId
- self.interventionLevels = interventionLevels
- }
- }
- // MARK: - AssessmentLesson
- class AssessmentLesson: Codable {
- var createdBy, createdDate, lastModifiedBy, lastModifiedDate: String?
- var id: Int?
- var name: String?
- var lessonCreatedUserName, lessonApprovedUserName, lessonApprovedDateTime: JSONNull?
- var status, comments: String?
- var unit: AssessmentUnit?
- init(createdBy: String?, createdDate: String?, lastModifiedBy: String?, lastModifiedDate: String?, id: Int?, name: String?, lessonCreatedUserName: JSONNull?, lessonApprovedUserName: JSONNull?, lessonApprovedDateTime: JSONNull?, status: String?, comments: String?, unit: AssessmentUnit?) {
- self.createdBy = createdBy
- self.createdDate = createdDate
- self.lastModifiedBy = lastModifiedBy
- self.lastModifiedDate = lastModifiedDate
- self.id = id
- self.name = name
- self.lessonCreatedUserName = lessonCreatedUserName
- self.lessonApprovedUserName = lessonApprovedUserName
- self.lessonApprovedDateTime = lessonApprovedDateTime
- self.status = status
- self.comments = comments
- self.unit = unit
- }
- }
- // MARK: - AssessmentUnit
- class AssessmentUnit: Codable {
- var createdBy, createdDate, lastModifiedBy, lastModifiedDate: String?
- var id: Int?
- var academicYear, name: String?
- var unitCreatedUserName, unitApprovedUserName, unitApprovedDateTime: JSONNull?
- var status: String?
- var intervention: AssessmentIntervention?
- var level: Level?
- var comments: String?
- init(createdBy: String?, createdDate: String?, lastModifiedBy: String?, lastModifiedDate: String?, id: Int?, academicYear: String?, name: String?, unitCreatedUserName: JSONNull?, unitApprovedUserName: JSONNull?, unitApprovedDateTime: JSONNull?, status: String?, intervention: AssessmentIntervention?, level: Level?, comments: String?) {
- self.createdBy = createdBy
- self.createdDate = createdDate
- self.lastModifiedBy = lastModifiedBy
- self.lastModifiedDate = lastModifiedDate
- self.id = id
- self.academicYear = academicYear
- self.name = name
- self.unitCreatedUserName = unitCreatedUserName
- self.unitApprovedUserName = unitApprovedUserName
- self.unitApprovedDateTime = unitApprovedDateTime
- self.status = status
- self.intervention = intervention
- self.level = level
- self.comments = comments
- }
- }
- // MARK: - AssessmentBatch
- class AssessmentBatch: Codable {
- var createdBy, createdDate, lastModifiedBy, lastModifiedDate: String?
- var id: Int?
- var academicYear, batchName: String?
- var studentBatch, deleted, active: Bool?
- var status, comments: String?
- var interventionDTO: AssessmentIntervention?
- var schoolDTO: AssessmentSchoolDTO?
- var batachUserDtos: [AssessmentBatachUserDto]?
- var level: Level?
- var createdByUser, approvedByUser, approvalDateTime: JSONNull?
- init(createdBy: String?, createdDate: String?, lastModifiedBy: String?, lastModifiedDate: String?, id: Int?, academicYear: String?, batchName: String?, studentBatch: Bool?, deleted: Bool?, active: Bool?, status: String?, comments: String?, interventionDTO: AssessmentIntervention?, schoolDTO: AssessmentSchoolDTO?, batachUserDtos: [AssessmentBatachUserDto]?, level: Level?, createdByUser: JSONNull?, approvedByUser: JSONNull?, approvalDateTime: JSONNull?) {
- self.createdBy = createdBy
- self.createdDate = createdDate
- self.lastModifiedBy = lastModifiedBy
- self.lastModifiedDate = lastModifiedDate
- self.id = id
- self.academicYear = academicYear
- self.batchName = batchName
- self.studentBatch = studentBatch
- self.deleted = deleted
- self.active = active
- self.status = status
- self.comments = comments
- self.interventionDTO = interventionDTO
- self.schoolDTO = schoolDTO
- self.batachUserDtos = batachUserDtos
- self.level = level
- self.createdByUser = createdByUser
- self.approvedByUser = approvedByUser
- self.approvalDateTime = approvalDateTime
- }
- }
- // MARK: - AssessmentBatachUserDto
- class AssessmentBatachUserDto: Codable {
- var userDto: AssessmentUserDto?
- var standard, division: String?
- var offlineAttendance: JSONNull?
- init(userDto: AssessmentUserDto?, standard: String?, division: String?, offlineAttendance: JSONNull?) {
- self.userDto = userDto
- self.standard = standard
- self.division = division
- self.offlineAttendance = offlineAttendance
- }
- }
- // MARK: - AssessmentUserDto
- class AssessmentUserDto: Codable {
- var id: Int?
- var name: String?
- var middleName: String?
- var lastName, username, email: String?
- var mobile: String?
- var schoolName: JSONNull?
- var userType: AssessmentUserType?
- var keycloakUserId: String?
- var enable, tempPass: Bool?
- var batchId: Int?
- var intervantions: [Int]?
- var password, errorMsg: JSONNull?
- init(id: Int?, name: String?, middleName: String?, lastName: String?, username: String?, email: String?, mobile: String?, schoolName: JSONNull?, userType: AssessmentUserType?, keycloakUserId: String?, enable: Bool?, tempPass: Bool?, batchId: Int?, intervantions: [Int]?, password: JSONNull?, errorMsg: JSONNull?) {
- self.id = id
- self.name = name
- self.middleName = middleName
- self.lastName = lastName
- self.username = username
- self.email = email
- self.mobile = mobile
- self.schoolName = schoolName
- self.userType = userType
- self.keycloakUserId = keycloakUserId
- self.enable = enable
- self.tempPass = tempPass
- self.batchId = batchId
- self.intervantions = intervantions
- self.password = password
- self.errorMsg = errorMsg
- }
- }
- // MARK: - AssessmentUserType
- class AssessmentUserType: Codable {
- var id: Int?
- var actor, parentActor, discription, defaultRealmRole: String?
- var createAccess, deleteAccess, editAccess, viewAccess: String?
- var appUrl: String?
- init(id: Int?, actor: String?, parentActor: String?, discription: String?, defaultRealmRole: String?, createAccess: String?, deleteAccess: String?, editAccess: String?, viewAccess: String?, appUrl: String?) {
- self.id = id
- self.actor = actor
- self.parentActor = parentActor
- self.discription = discription
- self.defaultRealmRole = defaultRealmRole
- self.createAccess = createAccess
- self.deleteAccess = deleteAccess
- self.editAccess = editAccess
- self.viewAccess = viewAccess
- self.appUrl = appUrl
- }
- }
- // MARK: - AssessmentSchoolDTO
- class AssessmentSchoolDTO: Codable {
- var schoolId, schoolName, state, city: String?
- var pincode: Int?
- var active, deleted: Bool?
- var status: JSONNull?
- init(schoolId: String?, schoolName: String?, state: String?, city: String?, pincode: Int?, active: Bool?, deleted: Bool?, status: JSONNull?) {
- self.schoolId = schoolId
- self.schoolName = schoolName
- self.state = state
- self.city = city
- self.pincode = pincode
- self.active = active
- self.deleted = deleted
- self.status = status
- }
- }
- typealias AssessmentList = [AssessmentListModel]
|