// // SessionInterventionModel.swift // LMS // // Created by Suraj Kumar Mandal on 05/09/22. // // let interventionList = try? newJSONDecoder().decode(InterventionList.self, from: jsonData) import Foundation // MARK: - SessionInterventionModel class SessionInterventionModel: Codable { var id, incrementor: Int? var interventionId, interventionName: String? var interventionLevels: [String]? var beneficiaryIds: [Int]? var deleted, active: Bool? var status: String? var interventionSchoolMappings: [InterventionSchoolMapping]? var mappedProgramHeads: [MappedProgramHead]? init(id: Int?, incrementor: Int?, interventionId: String?, interventionName: String?, interventionLevels: [String]?, beneficiaryIds: [Int]?, deleted: Bool?, active: Bool?, status: String?, interventionSchoolMappings: [InterventionSchoolMapping]?, mappedProgramHeads: [MappedProgramHead]?) { 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 } } // MARK: - InterventionSchoolMapping class InterventionSchoolMapping: Codable { var id, interventionTableId: Int? var schoolMasterTableId: String? var deleted, active: Bool? var status: String? var interventionEntity: SessionInterventionModel? var schoolMasterDTO: JSONNull? init(id: Int?, interventionTableId: Int?, schoolMasterTableId: String?, deleted: Bool?, active: Bool?, status: String?, interventionEntity: SessionInterventionModel?, schoolMasterDTO: JSONNull?) { self.id = id self.interventionTableId = interventionTableId self.schoolMasterTableId = schoolMasterTableId self.deleted = deleted self.active = active self.status = status self.interventionEntity = interventionEntity self.schoolMasterDTO = schoolMasterDTO } } // MARK: - MappedProgramHead class MappedProgramHead: Codable { var id: Int? var userType: JSONNull? var phName: String? var phLastName: JSONNull? var phEmail, phMobile: String? var userId, phEmployeeId: JSONNull? var deleted, active: Bool? var status: String? var interventionIds: [JSONAny]? init(id: Int?, userType: JSONNull?, phName: String?, phLastName: JSONNull?, phEmail: String?, phMobile: String?, userId: JSONNull?, phEmployeeId: JSONNull?, deleted: Bool?, active: Bool?, status: String?, interventionIds: [JSONAny]?) { self.id = id self.userType = userType self.phName = phName self.phLastName = phLastName self.phEmail = phEmail self.phMobile = phMobile self.userId = userId self.phEmployeeId = phEmployeeId self.deleted = deleted self.active = active self.status = status self.interventionIds = interventionIds } }