Merge branch 'main' into splash
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import 'package:get/get.dart';
|
||||
|
||||
class FAQModel {
|
||||
String? status;
|
||||
int? statusCode;
|
||||
@@ -97,6 +99,7 @@ class FaqQueAns {
|
||||
String? deletedAt;
|
||||
String? createdAt;
|
||||
String? updatedAt;
|
||||
List<UserLikes>? userLikes;
|
||||
|
||||
FaqQueAns(
|
||||
{this.id,
|
||||
@@ -108,7 +111,8 @@ class FaqQueAns {
|
||||
this.modifiedBy,
|
||||
this.deletedAt,
|
||||
this.createdAt,
|
||||
this.updatedAt});
|
||||
this.updatedAt,
|
||||
this.userLikes});
|
||||
|
||||
FaqQueAns.fromJson(Map<String, dynamic> json) {
|
||||
id = json['id'];
|
||||
@@ -121,6 +125,12 @@ class FaqQueAns {
|
||||
deletedAt = json['deleted_at'] ?? "";
|
||||
createdAt = json['created_at'];
|
||||
updatedAt = json['updated_at'];
|
||||
if (json['user_likes'] != null) {
|
||||
userLikes = <UserLikes>[];
|
||||
json['user_likes'].forEach((v) {
|
||||
userLikes!.add(UserLikes.fromJson(v));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -133,6 +143,53 @@ class FaqQueAns {
|
||||
data['created_by'] = createdBy;
|
||||
data['modified_by'] = modifiedBy;
|
||||
data['deleted_at'] = deletedAt;
|
||||
data['created_at'] = createdAt;
|
||||
data['updated_at'] = updatedAt;
|
||||
if (userLikes != null) {
|
||||
data['user_likes'] = userLikes!.map((v) => v.toJson()).toList();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class UserLikes {
|
||||
int? id;
|
||||
int? userId;
|
||||
int? faqId;
|
||||
int? status; //RxInt? status;
|
||||
String? isActive;
|
||||
|
||||
String? createdAt;
|
||||
String? updatedAt;
|
||||
|
||||
UserLikes(
|
||||
{this.id,
|
||||
this.userId,
|
||||
this.faqId,
|
||||
this.status,
|
||||
this.isActive,
|
||||
this.createdAt,
|
||||
this.updatedAt});
|
||||
|
||||
UserLikes.fromJson(Map<String, dynamic> json) {
|
||||
id = json['id'];
|
||||
userId = json['user_id'];
|
||||
faqId = json['faq_id'];
|
||||
status = (json['status']); // RxInt(json['status']);
|
||||
isActive = json['is_active'];
|
||||
|
||||
createdAt = json['created_at'];
|
||||
updatedAt = json['updated_at'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = <String, dynamic>{};
|
||||
data['id'] = id;
|
||||
data['user_id'] = userId;
|
||||
data['faq_id'] = faqId;
|
||||
data['status'] = status;
|
||||
data['is_active'] = isActive;
|
||||
|
||||
data['created_at'] = createdAt;
|
||||
data['updated_at'] = updatedAt;
|
||||
return data;
|
||||
|
||||
Reference in New Issue
Block a user