fist commit ftc staff app clone

This commit is contained in:
2024-08-01 13:46:46 +05:30
commit bf9064a9c9
515 changed files with 42796 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
import 'RiskAssessmentData.dart';
class GetRiskAssessmentResponse {
GetRiskAssessmentResponse({
this.success,
this.status,
this.message,
this.data,});
GetRiskAssessmentResponse.fromJson(dynamic json) {
status = json['status'];
message = json['message'];
if (json['data'] != null) {
data = [];
json['data'].forEach((v) {
data?.add(RiskAssessmentData.fromJson(v));
});
}
}
bool? success;
String? status;
String? message;
List<RiskAssessmentData>? data;
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
map['status'] = status;
map['message'] = message;
if (data != null) {
map['data'] = data?.map((v) => v.toJson()).toList();
}
return map;
}
}

View File

@@ -0,0 +1,20 @@
class InPlace {
InPlace({
this.y,
this.n,});
InPlace.fromJson(dynamic json) {
y = json['y'];
n = json['n'];
}
int? y;
int? n;
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
map['y'] = y;
map['n'] = n;
return map;
}
}

View File

@@ -0,0 +1,24 @@
class PureRiskRating {
PureRiskRating({
this.c,
this.l,
this.r,});
PureRiskRating.fromJson(dynamic json) {
c = json['c'];
l = json['l'];
r = json['r'];
}
int? c;
int? l;
int? r;
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
map['c'] = c;
map['l'] = l;
map['r'] = r;
return map;
}
}

View File

@@ -0,0 +1,24 @@
class ResidualRiskRating {
ResidualRiskRating({
this.c,
this.l,
this.r,});
ResidualRiskRating.fromJson(dynamic json) {
c = json['c'];
l = json['l'];
r = json['r'];
}
int? c;
int? l;
int? r;
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
map['c'] = c;
map['l'] = l;
map['r'] = r;
return map;
}
}

View File

@@ -0,0 +1,72 @@
import 'PureRiskRating.dart';
import 'InPlace.dart';
import 'ResidualRiskRating.dart';
class RiskAssessmentData {
RiskAssessmentData({
this.pureRiskRating,
this.inPlace,
this.residualRiskRating,
this.id,
this.hazard,
this.personsExposedToHazard,
this.riskIdentified,
this.coldMeasureRequired,
this.userId,
this.createdAt,
this.updatedAt,
});
RiskAssessmentData.fromJson(dynamic json) {
pureRiskRating = json['pureRiskRating'] != null
? PureRiskRating.fromJson(json['pureRiskRating'])
: null;
inPlace =
json['inPlace'] != null ? InPlace.fromJson(json['inPlace']) : null;
residualRiskRating = json['residualRiskRating'] != null
? ResidualRiskRating.fromJson(json['residualRiskRating'])
: null;
id = json['_id'];
hazard = json['hazard'];
personsExposedToHazard = json['personsExposedToHazard'];
riskIdentified = json['riskIdentified'];
coldMeasureRequired = json['coldMeasureRequired'];
userId = json['userId'];
createdAt = json['createdAt'];
updatedAt = json['updatedAt'];
}
PureRiskRating? pureRiskRating;
InPlace? inPlace;
ResidualRiskRating? residualRiskRating;
String? id;
String? hazard;
String? personsExposedToHazard;
String? riskIdentified;
String? coldMeasureRequired;
String? userId;
String? createdAt;
String? updatedAt;
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
if (pureRiskRating != null) {
map['pureRiskRating'] = pureRiskRating?.toJson();
}
if (inPlace != null) {
map['inPlace'] = inPlace?.toJson();
}
if (residualRiskRating != null) {
map['residualRiskRating'] = residualRiskRating?.toJson();
}
map['_id'] = id;
map['hazard'] = hazard;
map['personsExposedToHazard'] = personsExposedToHazard;
map['riskIdentified'] = riskIdentified;
map['coldMeasureRequired'] = coldMeasureRequired;
map['userId'] = userId;
map['createdAt'] = createdAt;
map['updatedAt'] = updatedAt;
return map;
}
}