|
| 1 | +export class RiskModel { |
| 2 | + id?: number; |
| 3 | + risk_name!: string; |
| 4 | + risk_owner!: number; |
| 5 | + ai_lifecycle_phase!: |
| 6 | + | "Problem definition & planning" |
| 7 | + | "Data collection & processing" |
| 8 | + | "Model development & training" |
| 9 | + | "Model validation & testing" |
| 10 | + | "Deployment & integration" |
| 11 | + | "Monitoring & maintenance" |
| 12 | + | "Decommissioning & retirement"; |
| 13 | + risk_description!: string; |
| 14 | + risk_category!: string[]; |
| 15 | + impact!: string; |
| 16 | + assessment_mapping!: string; |
| 17 | + controls_mapping!: string; |
| 18 | + likelihood!: "Rare" | "Unlikely" | "Possible" | "Likely" | "Almost Certain"; |
| 19 | + severity!: "Negligible" | "Minor" | "Moderate" | "Major" | "Catastrophic"; |
| 20 | + risk_level_autocalculated!: |
| 21 | + | "No risk" |
| 22 | + | "Very low risk" |
| 23 | + | "Low risk" |
| 24 | + | "Medium risk" |
| 25 | + | "High risk" |
| 26 | + | "Very high risk"; |
| 27 | + review_notes!: string; |
| 28 | + mitigation_status!: |
| 29 | + | "Not Started" |
| 30 | + | "In Progress" |
| 31 | + | "Completed" |
| 32 | + | "On Hold" |
| 33 | + | "Deferred" |
| 34 | + | "Canceled" |
| 35 | + | "Requires review"; |
| 36 | + current_risk_level!: |
| 37 | + | "Very Low risk" |
| 38 | + | "Low risk" |
| 39 | + | "Medium risk" |
| 40 | + | "High risk" |
| 41 | + | "Very high risk"; |
| 42 | + deadline!: Date; |
| 43 | + mitigation_plan!: string; |
| 44 | + implementation_strategy!: string; |
| 45 | + mitigation_evidence_document!: string; |
| 46 | + likelihood_mitigation!: |
| 47 | + | "Rare" |
| 48 | + | "Unlikely" |
| 49 | + | "Possible" |
| 50 | + | "Likely" |
| 51 | + | "Almost Certain"; |
| 52 | + risk_severity!: "Negligible" | "Minor" | "Moderate" | "Major" | "Critical"; |
| 53 | + final_risk_level!: string; |
| 54 | + risk_approval!: number; |
| 55 | + approval_status!: string; |
| 56 | + date_of_assessment!: Date; |
| 57 | + is_demo?: boolean; |
| 58 | + created_at?: Date; |
| 59 | + |
| 60 | + constructor(data: RiskModel) { |
| 61 | + this.id = data.id; |
| 62 | + this.risk_name = data.risk_name; |
| 63 | + this.risk_owner = data.risk_owner; |
| 64 | + this.ai_lifecycle_phase = data.ai_lifecycle_phase; |
| 65 | + this.risk_description = data.risk_description; |
| 66 | + this.risk_category = data.risk_category; |
| 67 | + this.impact = data.impact; |
| 68 | + this.assessment_mapping = data.assessment_mapping; |
| 69 | + this.controls_mapping = data.controls_mapping; |
| 70 | + this.likelihood = data.likelihood; |
| 71 | + this.severity = data.severity; |
| 72 | + this.risk_level_autocalculated = data.risk_level_autocalculated; |
| 73 | + this.review_notes = data.review_notes; |
| 74 | + this.mitigation_status = data.mitigation_status; |
| 75 | + this.current_risk_level = data.current_risk_level; |
| 76 | + this.deadline = data.deadline; |
| 77 | + this.mitigation_plan = data.mitigation_plan; |
| 78 | + this.implementation_strategy = data.implementation_strategy; |
| 79 | + this.mitigation_evidence_document = data.mitigation_evidence_document; |
| 80 | + this.likelihood_mitigation = data.likelihood_mitigation; |
| 81 | + this.risk_severity = data.risk_severity; |
| 82 | + this.final_risk_level = data.final_risk_level; |
| 83 | + this.risk_approval = data.risk_approval; |
| 84 | + this.approval_status = data.approval_status; |
| 85 | + this.date_of_assessment = data.date_of_assessment; |
| 86 | + this.is_demo = data.is_demo; |
| 87 | + this.created_at = data.created_at; |
| 88 | + } |
| 89 | + |
| 90 | + static createNewRisk(data: RiskModel): RiskModel { |
| 91 | + return new RiskModel(data); |
| 92 | + } |
| 93 | +} |
0 commit comments