import 'dart:convert'; MDeleteCredentialData mDeleteCredentialDataFromJson(String str) => MDeleteCredentialData.fromJson(json.decode(str)); String mDeleteCredentialDataToJson(MDeleteCredentialData data) => json.encode(data.toJson()); class MDeleteCredentialData { bool success; String message; Data data; MDeleteCredentialData({ required this.success, required this.message, required this.data, }); factory MDeleteCredentialData.fromJson(Map json) => MDeleteCredentialData( success: json["success"], message: json["message"], data: Data.fromJson(json["data"]), ); Map toJson() => { "success": success, "message": message, "data": data.toJson(), }; @override String toString() { return ' $message'; } } class Data { int id; String name; String username; String password; String detail; int createdBy; int modifiedBy; DateTime createdAt; DateTime updatedAt; Data({ required this.id, required this.name, required this.username, required this.password, required this.detail, required this.createdBy, required this.modifiedBy, required this.createdAt, required this.updatedAt, }); factory Data.fromJson(Map json) => Data( id: json["id"], name: json["name"], username: json["username"], password: json["password"], detail: json["detail"], createdBy: json["created_by"], modifiedBy: json["modified_by"], createdAt: DateTime.parse(json["created_at"]), updatedAt: DateTime.parse(json["updated_at"]), ); Map toJson() => { "id": id, "name": name, "username": username, "password": password, "detail": detail, "created_by": createdBy, "modified_by": modifiedBy, "created_at": createdAt.toIso8601String(), "updated_at": updatedAt.toIso8601String(), }; }