kyc and update risk profile api integration and issues fixed
This commit is contained in:
76
lib/model/KycModel/kyc_model.dart
Normal file
76
lib/model/KycModel/kyc_model.dart
Normal file
@@ -0,0 +1,76 @@
|
||||
class GetKYCModel {
|
||||
String? status;
|
||||
int? statusCode;
|
||||
String? message;
|
||||
List<Data>? data;
|
||||
|
||||
GetKYCModel({this.status, this.statusCode, this.message, this.data});
|
||||
|
||||
GetKYCModel.fromJson(Map<String, dynamic> json) {
|
||||
status = json['status'];
|
||||
statusCode = json['status_code'];
|
||||
message = json['message'];
|
||||
if (json['data'] != null) {
|
||||
data = <Data>[];
|
||||
json['data'].forEach((v) {
|
||||
data!.add(Data.fromJson(v));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = <String, dynamic>{};
|
||||
data['status'] = status;
|
||||
data['status_code'] = statusCode;
|
||||
data['message'] = message;
|
||||
if (this.data != null) {
|
||||
data['data'] = this.data!.map((v) => v.toJson()).toList();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class Data {
|
||||
int? id;
|
||||
int? userId;
|
||||
String? adharcardNumber;
|
||||
String? panNumber;
|
||||
String? pancardImageFront;
|
||||
String? pancardImageBack;
|
||||
String? adharcardImageFront;
|
||||
String? adharcardImageBack;
|
||||
|
||||
Data(
|
||||
{this.id,
|
||||
this.userId,
|
||||
this.adharcardNumber,
|
||||
this.panNumber,
|
||||
this.pancardImageFront,
|
||||
this.pancardImageBack,
|
||||
this.adharcardImageFront,
|
||||
this.adharcardImageBack});
|
||||
|
||||
Data.fromJson(Map<String, dynamic> json) {
|
||||
id = json['id'];
|
||||
userId = json['user_id'];
|
||||
adharcardNumber = json['adharcard_number'];
|
||||
panNumber = json['pan_number'] ?? "";
|
||||
pancardImageFront = json['pancard_image_front'];
|
||||
pancardImageBack = json['pancard_image_back'];
|
||||
adharcardImageFront = json['adharcard_image_front'];
|
||||
adharcardImageBack = json['adharcard_image_back'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = <String, dynamic>{};
|
||||
data['id'] = id;
|
||||
data['user_id'] = userId;
|
||||
data['adharcard_number'] = adharcardNumber;
|
||||
data['pan_number'] = panNumber;
|
||||
data['pancard_image_front'] = pancardImageFront;
|
||||
data['pancard_image_back'] = pancardImageBack;
|
||||
data['adharcard_image_front'] = adharcardImageFront;
|
||||
data['adharcard_image_back'] = adharcardImageBack;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
118
lib/model/RiskProfileModel/get_user_risk_profile_model.dart
Normal file
118
lib/model/RiskProfileModel/get_user_risk_profile_model.dart
Normal file
@@ -0,0 +1,118 @@
|
||||
class GetUserRiskProfileModel {
|
||||
String? status;
|
||||
int? statusCode;
|
||||
String? message;
|
||||
List<Data>? data;
|
||||
|
||||
GetUserRiskProfileModel(
|
||||
{this.status, this.statusCode, this.message, this.data});
|
||||
|
||||
GetUserRiskProfileModel.fromJson(Map<String, dynamic> json) {
|
||||
status = json['status'];
|
||||
statusCode = json['status_code'];
|
||||
message = json['message'];
|
||||
if (json['data'] != null) {
|
||||
data = <Data>[];
|
||||
json['data'].forEach((v) {
|
||||
data!.add(Data.fromJson(v));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = <String, dynamic>{};
|
||||
data['status'] = status;
|
||||
data['status_code'] = statusCode;
|
||||
data['message'] = message;
|
||||
if (this.data != null) {
|
||||
data['data'] = this.data!.map((v) => v.toJson()).toList();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class Data {
|
||||
int? id;
|
||||
int? userId;
|
||||
int? questionId;
|
||||
int? answerId;
|
||||
QuestionData? questionData;
|
||||
AnswerData? answerData;
|
||||
|
||||
Data(
|
||||
{this.id,
|
||||
this.userId,
|
||||
this.questionId,
|
||||
this.answerId,
|
||||
this.questionData,
|
||||
this.answerData});
|
||||
|
||||
Data.fromJson(Map<String, dynamic> json) {
|
||||
id = json['id'];
|
||||
userId = json['user_id'];
|
||||
questionId = json['question_id'];
|
||||
answerId = json['answer_id'];
|
||||
questionData = json['question_data'] != null
|
||||
? QuestionData.fromJson(json['question_data'])
|
||||
: null;
|
||||
answerData = json['answer_data'] != null
|
||||
? AnswerData.fromJson(json['answer_data'])
|
||||
: null;
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = <String, dynamic>{};
|
||||
data['id'] = id;
|
||||
data['user_id'] = userId;
|
||||
data['question_id'] = questionId;
|
||||
data['answer_id'] = answerId;
|
||||
if (questionData != null) {
|
||||
data['question_data'] = questionData!.toJson();
|
||||
}
|
||||
if (answerData != null) {
|
||||
data['answer_data'] = answerData!.toJson();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class QuestionData {
|
||||
int? id;
|
||||
String? question;
|
||||
String? hint;
|
||||
|
||||
QuestionData({this.id, this.question, this.hint});
|
||||
|
||||
QuestionData.fromJson(Map<String, dynamic> json) {
|
||||
id = json['id'];
|
||||
question = json['question'];
|
||||
hint = json['hint'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = <String, dynamic>{};
|
||||
data['id'] = id;
|
||||
data['question'] = question;
|
||||
data['hint'] = hint;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class AnswerData {
|
||||
int? id;
|
||||
String? answer;
|
||||
|
||||
AnswerData({this.id, this.answer});
|
||||
|
||||
AnswerData.fromJson(Map<String, dynamic> json) {
|
||||
id = json['id'];
|
||||
answer = json['answer'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = <String, dynamic>{};
|
||||
data['id'] = id;
|
||||
data['answer'] = answer;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@@ -35,7 +35,7 @@ class Data {
|
||||
int? id;
|
||||
String? question;
|
||||
String? isActive;
|
||||
|
||||
String? hint;
|
||||
String? createdAt;
|
||||
String? updatedAt;
|
||||
List<Answer>? answer;
|
||||
@@ -43,6 +43,7 @@ class Data {
|
||||
Data(
|
||||
{this.id,
|
||||
this.question,
|
||||
this.hint,
|
||||
this.isActive,
|
||||
this.createdAt,
|
||||
this.updatedAt,
|
||||
@@ -52,7 +53,7 @@ class Data {
|
||||
id = json['id'];
|
||||
question = json['question'];
|
||||
isActive = json['is_active'];
|
||||
|
||||
hint = json['hint'];
|
||||
createdAt = json['created_at'];
|
||||
updatedAt = json['updated_at'];
|
||||
if (json['answer'] != null) {
|
||||
@@ -68,7 +69,7 @@ class Data {
|
||||
data['id'] = id;
|
||||
data['question'] = question;
|
||||
data['is_active'] = isActive;
|
||||
|
||||
data['hint'] = hint;
|
||||
data['created_at'] = createdAt;
|
||||
data['updated_at'] = updatedAt;
|
||||
if (answer != null) {
|
||||
@@ -84,7 +85,6 @@ class Answer {
|
||||
String? answer;
|
||||
int? points;
|
||||
String? isActive;
|
||||
|
||||
String? createdAt;
|
||||
String? updatedAt;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user