382 lines
12 KiB
Dart
382 lines
12 KiB
Dart
import 'package:ftc_mobile_app/models/profileData/user_data.dart';
|
|
import 'package:quill_html_editor/quill_html_editor.dart';
|
|
|
|
class PBSListDataJson {
|
|
PBSListDataJson({
|
|
required this.pbsList,
|
|
required this.count,
|
|
});
|
|
|
|
List<PbsList> pbsList = [];
|
|
int count = -1;
|
|
|
|
PBSListDataJson.empty();
|
|
|
|
PBSListDataJson.fromJson(Map<String, dynamic> json) {
|
|
for (var item in json['pbsList']) {
|
|
pbsList.add(PbsList.fromJson(item));
|
|
}
|
|
// pbsList = List.from(json['pbsList']).map((e)=>PbsList.fromJson(e)).toList();
|
|
count = json['count'];
|
|
}
|
|
|
|
Map<String, dynamic> toJson() {
|
|
final data = <String, dynamic>{};
|
|
data['pbsList'] = pbsList.map((e) => e.toJson()).toList();
|
|
data['count'] = count;
|
|
return data;
|
|
}
|
|
|
|
@override
|
|
String toString() {
|
|
return 'PBSListDataJson{pbsList: $pbsList, count: $count}';
|
|
}
|
|
}
|
|
|
|
class PbsList {
|
|
PbsList({
|
|
required this.id,
|
|
required this.userIdModelInPbs,
|
|
required this.staffId,
|
|
required this.aboutPlan,
|
|
required this.managementOfBehaviorPlan,
|
|
required this.secondaryPrevention,
|
|
required this.reactiveStrategies,
|
|
required this.postIncidentSupport,
|
|
required this.updatedAt,
|
|
required this.createdAt,
|
|
});
|
|
|
|
String id = "";
|
|
UserData? userIdModelInPbs;
|
|
UserData? staffId;
|
|
String aboutPlan = "";
|
|
String managementOfBehaviorPlan = "";
|
|
String secondaryPrevention = "";
|
|
String reactiveStrategies = "";
|
|
String postIncidentSupport = "";
|
|
String updatedAt = "";
|
|
String createdAt = "";
|
|
|
|
QuillEditorController aboutPlanQuillController = QuillEditorController();
|
|
QuillEditorController managementOfBehaviouralPresentationQuillController = QuillEditorController();
|
|
QuillEditorController secondaryPreventionQuillController = QuillEditorController();
|
|
QuillEditorController reactiveStrategiesQuillController = QuillEditorController();
|
|
QuillEditorController postIncidentSupportRecoveryQuillController = QuillEditorController();
|
|
|
|
PbsList.empty();
|
|
|
|
PbsList.addData({
|
|
required this.id,
|
|
required this.aboutPlan,
|
|
required this.managementOfBehaviorPlan,
|
|
required this.secondaryPrevention,
|
|
required this.reactiveStrategies,
|
|
required this.postIncidentSupport,
|
|
});
|
|
|
|
PbsList.fromJson(Map<String, dynamic> json) {
|
|
id = json['_id'] ?? "";
|
|
userIdModelInPbs = UserData.fromJson(json['userId'] ?? {});
|
|
staffId = UserData.fromJson(json['staffId'] ?? {});
|
|
aboutPlan = json['aboutPlan'] ?? "";
|
|
managementOfBehaviorPlan = json['managementOfBehaviorPlan'] ?? "";
|
|
secondaryPrevention = json['secondaryPrevention'] ?? "";
|
|
reactiveStrategies = json['reactiveStartegies'] ?? "";
|
|
postIncidentSupport = json['postIncidentSupport'] ?? "";
|
|
updatedAt = json['updatedAt'] ?? "";
|
|
createdAt = json['createdAt'] ?? "";
|
|
}
|
|
|
|
Map<String, dynamic> toJson() {
|
|
final data = <String, dynamic>{};
|
|
data['_id'] = id;
|
|
data['userId'] = userIdModelInPbs?.toJson();
|
|
data['staffId'] = staffId?.toJson();
|
|
data['aboutPlan'] = aboutPlan;
|
|
data['managementOfBehaviorPlan'] = managementOfBehaviorPlan;
|
|
data['secondaryPrevention'] = secondaryPrevention;
|
|
data['reactiveStartegies'] = reactiveStrategies;
|
|
data['postIncidentSupport'] = postIncidentSupport;
|
|
data['updatedAt'] = updatedAt;
|
|
data['createdAt'] = createdAt;
|
|
return data;
|
|
}
|
|
}
|
|
|
|
// class UserIdModelInPbs {
|
|
// UserIdModelInPbs({
|
|
// required this.fcmTokens,
|
|
// required this.location,
|
|
// required this.id,
|
|
// required this.userModelName,
|
|
// required this.name,
|
|
// required this.version,
|
|
// required this.email,
|
|
// required this.phoneNumber,
|
|
// required this.active,
|
|
// required this.role,
|
|
// required this.profilePictureUrl,
|
|
// required this.deviceId,
|
|
// required this.verificationCode,
|
|
// required this.isVerified,
|
|
// required this.approved,
|
|
// required this.blocked,
|
|
// required this.createdAt,
|
|
// required this.updatedAt,
|
|
// required this.v,
|
|
// required this.password,
|
|
// required this.userSettings,
|
|
// required this.modelId,
|
|
// });
|
|
//
|
|
// FcmTokens fcmTokens = FcmTokens.empty();
|
|
// Location location = Location.empty();
|
|
// String id = "";
|
|
// String userModelName = "";
|
|
// String name = "";
|
|
// String version = "";
|
|
// String email = "";
|
|
// String phoneNumber = "";
|
|
// bool active = false;
|
|
// String role = "";
|
|
// String profilePictureUrl = "";
|
|
// String deviceId = "";
|
|
// String verificationCode = "";
|
|
// bool isVerified = false;
|
|
// bool approved = false;
|
|
// bool blocked = false;
|
|
// String createdAt = "";
|
|
// String updatedAt = "";
|
|
// int v = -1;
|
|
// String password = "";
|
|
// String userSettings = "";
|
|
// String modelId = "";
|
|
//
|
|
// UserIdModelInPbs.empty();
|
|
//
|
|
// UserIdModelInPbs.fromJson(Map<String, dynamic> json) {
|
|
// fcmTokens = FcmTokens.fromJson(json['fcm_tokens'] ?? "");
|
|
// location = Location.fromJson(json['location'] ?? "");
|
|
// id = json['_id'] ?? "";
|
|
// userModelName = json['userModelName'] ?? "";
|
|
// name = json['name'] ?? "";
|
|
// version = json['version'] ?? "";
|
|
// email = json['email'] ?? "";
|
|
// phoneNumber = json['phoneNumber'] ?? "";
|
|
// active = json['active'] ?? "";
|
|
// role = json['role'] ?? "";
|
|
// profilePictureUrl = json['profile_picture_url'] ?? "";
|
|
// deviceId = json['deviceId'] ?? "";
|
|
// verificationCode = json['verification_code'] ?? "";
|
|
// isVerified = json['is_verified'] ?? "";
|
|
// approved = json['approved'] ?? "";
|
|
// blocked = json['blocked'] ?? "";
|
|
// createdAt = json['createdAt'] ?? "";
|
|
// updatedAt = json['updatedAt'] ?? "";
|
|
// v = json['__v'] ?? "";
|
|
// password = json['password'] ?? "";
|
|
// userSettings = json['userSettings'] ?? "";
|
|
// modelId = json['modelId'] ?? "";
|
|
// }
|
|
//
|
|
// Map<String, dynamic> toJson() {
|
|
// final data = <String, dynamic>{};
|
|
// data['fcm_tokens'] = fcmTokens.toJson();
|
|
// data['location'] = location.toJson();
|
|
// data['_id'] = id;
|
|
// data['userModelName'] = userModelName;
|
|
// data['name'] = name;
|
|
// data['version'] = version;
|
|
// data['email'] = email;
|
|
// data['phoneNumber'] = phoneNumber;
|
|
// data['active'] = active;
|
|
// data['role'] = role;
|
|
// data['profile_picture_url'] = profilePictureUrl;
|
|
// data['deviceId'] = deviceId;
|
|
// data['verification_code'] = verificationCode;
|
|
// data['is_verified'] = isVerified;
|
|
// data['approved'] = approved;
|
|
// data['blocked'] = blocked;
|
|
// data['createdAt'] = createdAt;
|
|
// data['updatedAt'] = updatedAt;
|
|
// data['__v'] = v;
|
|
// data['password'] = password;
|
|
// data['userSettings'] = userSettings;
|
|
// data['modelId'] = modelId;
|
|
// return data;
|
|
// }
|
|
//
|
|
// @override
|
|
// String toString() {
|
|
// return 'UserId{fcmTokens: $fcmTokens, location: $location, id: $id, userModelName: $userModelName, name: $name, version: $version, email: $email, phoneNumber: $phoneNumber, active: $active, role: $role, profilePictureUrl: $profilePictureUrl, deviceId: $deviceId, verificationCode: $verificationCode, isVerified: $isVerified, approved: $approved, blocked: $blocked, createdAt: $createdAt, updatedAt: $updatedAt, v: $v, password: $password, userSettings: $userSettings, modelId: $modelId}';
|
|
// }
|
|
// }
|
|
//
|
|
// class FcmTokens {
|
|
// FcmTokens({
|
|
// required this.token,
|
|
// required this.deviceType,
|
|
// });
|
|
//
|
|
// String token = "";
|
|
// String deviceType = "";
|
|
//
|
|
// FcmTokens.empty();
|
|
//
|
|
// FcmTokens.fromJson(Map<String, dynamic> json) {
|
|
// token = json['token'] ?? "";
|
|
// deviceType = json['deviceType'] ?? "";
|
|
// }
|
|
//
|
|
// Map<String, dynamic> toJson() {
|
|
// final data = <String, dynamic>{};
|
|
// data['token'] = token;
|
|
// data['deviceType'] = deviceType;
|
|
// return data;
|
|
// }
|
|
//
|
|
// @override
|
|
// String toString() {
|
|
// return 'FcmTokens{token: $token, deviceType: $deviceType}';
|
|
// }
|
|
// }
|
|
//
|
|
// class Location {
|
|
// Location({
|
|
// required this.type,
|
|
// required this.coordinates,
|
|
// });
|
|
//
|
|
// String type = "";
|
|
// List<double> coordinates = [0, 0];
|
|
//
|
|
// Location.empty();
|
|
//
|
|
// Location.fromJson(Map<String, dynamic> json) {
|
|
// type = json['type'];
|
|
// coordinates = List.castFrom<dynamic, double>(json['coordinates']);
|
|
// }
|
|
//
|
|
// Map<String, dynamic> toJson() {
|
|
// final data = <String, dynamic>{};
|
|
// data['type'] = type;
|
|
// data['coordinates'] = coordinates;
|
|
// return data;
|
|
// }
|
|
//
|
|
// @override
|
|
// String toString() {
|
|
// return 'Location{type: $type, coordinates: $coordinates}';
|
|
// }
|
|
// }
|
|
//
|
|
// class StaffId {
|
|
// StaffId({
|
|
// required this.fcmTokens,
|
|
// required this.location,
|
|
// required this.id,
|
|
// required this.userModelName,
|
|
// required this.name,
|
|
// required this.version,
|
|
// required this.email,
|
|
// required this.phoneNumber,
|
|
// required this.active,
|
|
// required this.role,
|
|
// required this.profilePictureUrl,
|
|
// required this.deviceId,
|
|
// required this.verificationCode,
|
|
// required this.isVerified,
|
|
// required this.approved,
|
|
// required this.blocked,
|
|
// required this.createdAt,
|
|
// required this.updatedAt,
|
|
// required this.v,
|
|
// required this.password,
|
|
// required this.userSettings,
|
|
// required this.modelId,
|
|
// });
|
|
//
|
|
// FcmTokens fcmTokens = FcmTokens.empty();
|
|
// Location location = Location.empty();
|
|
// String id = "";
|
|
// String userModelName = "";
|
|
// String name = "";
|
|
// String version = "";
|
|
// String email = "";
|
|
// String phoneNumber = "";
|
|
// bool active = false;
|
|
// String role = "";
|
|
// String profilePictureUrl = "";
|
|
// String deviceId = "";
|
|
// String verificationCode = "";
|
|
// bool isVerified = false;
|
|
// bool approved = false;
|
|
// bool blocked = false;
|
|
// String createdAt = "";
|
|
// String updatedAt = "";
|
|
// int v = -1;
|
|
// String password = "";
|
|
// String userSettings = "";
|
|
// String modelId = "";
|
|
//
|
|
// StaffId.empty();
|
|
//
|
|
// StaffId.fromJson(Map<String, dynamic> json) {
|
|
// fcmTokens = FcmTokens.fromJson(json['fcm_tokens'] ?? "");
|
|
// location = Location.fromJson(json['location'] ?? "");
|
|
// id = json['_id'] ?? "";
|
|
// userModelName = json['userModelName'] ?? "";
|
|
// name = json['name'] ?? "";
|
|
// version = json['version'] ?? "";
|
|
// email = json['email'] ?? "";
|
|
// phoneNumber = json['phoneNumber'] ?? "";
|
|
// active = json['active'] ?? "";
|
|
// role = json['role'] ?? "";
|
|
// profilePictureUrl = json['profile_picture_url'] ?? "";
|
|
// deviceId = json['deviceId'] ?? "";
|
|
// verificationCode = json['verification_code'] ?? "";
|
|
// isVerified = json['is_verified'] ?? "";
|
|
// approved = json['approved'] ?? "";
|
|
// blocked = json['blocked'] ?? "";
|
|
// createdAt = json['createdAt'] ?? "";
|
|
// updatedAt = json['updatedAt'] ?? "";
|
|
// v = json['__v'] ?? "";
|
|
// password = json['password'] ?? "";
|
|
// userSettings = json['userSettings'] ?? "";
|
|
// modelId = json['modelId'] ?? "";
|
|
// }
|
|
//
|
|
// Map<String, dynamic> toJson() {
|
|
// final data = <String, dynamic>{};
|
|
// data['fcm_tokens'] = fcmTokens.toJson();
|
|
// data['location'] = location.toJson();
|
|
// data['_id'] = id;
|
|
// data['userModelName'] = userModelName;
|
|
// data['name'] = name;
|
|
// data['version'] = version;
|
|
// data['email'] = email;
|
|
// data['phoneNumber'] = phoneNumber;
|
|
// data['active'] = active;
|
|
// data['role'] = role;
|
|
// data['profile_picture_url'] = profilePictureUrl;
|
|
// data['deviceId'] = deviceId;
|
|
// data['verification_code'] = verificationCode;
|
|
// data['is_verified'] = isVerified;
|
|
// data['approved'] = approved;
|
|
// data['blocked'] = blocked;
|
|
// data['createdAt'] = createdAt;
|
|
// data['updatedAt'] = updatedAt;
|
|
// data['__v'] = v;
|
|
// data['password'] = password;
|
|
// data['userSettings'] = userSettings;
|
|
// data['modelId'] = modelId;
|
|
// return data;
|
|
// }
|
|
//
|
|
// @override
|
|
// String toString() {
|
|
// return 'StaffId{fcmTokens: $fcmTokens, location: $location, id: $id, userModelName: $userModelName, name: $name, version: $version, email: $email, phoneNumber: $phoneNumber, active: $active, role: $role, profilePictureUrl: $profilePictureUrl, deviceId: $deviceId, verificationCode: $verificationCode, isVerified: $isVerified, approved: $approved, blocked: $blocked, createdAt: $createdAt, updatedAt: $updatedAt, v: $v, password: $password, userSettings: $userSettings, modelId: $modelId}';
|
|
// }
|
|
// }
|