186 lines
5.4 KiB
Dart
186 lines
5.4 KiB
Dart
class CommunityinfopageEditModel {
|
|
CommunityinfopageEditModel({
|
|
required this.status,
|
|
required this.statusCode,
|
|
required this.message,
|
|
required this.data,
|
|
});
|
|
|
|
final String? status;
|
|
final int? statusCode;
|
|
final String? message;
|
|
final Data? data;
|
|
|
|
factory CommunityinfopageEditModel.fromJson(Map<String, dynamic> json){
|
|
return CommunityinfopageEditModel(
|
|
status: json["status"],
|
|
statusCode: json["status_code"],
|
|
message: json["message"],
|
|
data: json["data"] == null ? null : Data.fromJson(json["data"]),
|
|
);
|
|
}
|
|
|
|
}
|
|
|
|
class Data {
|
|
Data({
|
|
required this.typesOfCommunity,
|
|
required this.communityData,
|
|
});
|
|
|
|
final List<TypesOfCommunity> typesOfCommunity;
|
|
final CommunityData? communityData;
|
|
|
|
factory Data.fromJson(Map<String, dynamic> json){
|
|
return Data(
|
|
typesOfCommunity: json["typesOfCommunity"] == null ? [] : List<TypesOfCommunity>.from(json["typesOfCommunity"]!.map((x) => TypesOfCommunity.fromJson(x))),
|
|
communityData: json["communityData"] == null ? null : CommunityData.fromJson(json["communityData"]),
|
|
);
|
|
}
|
|
|
|
}
|
|
|
|
class CommunityData {
|
|
CommunityData({
|
|
required this.id,
|
|
required this.communityProfilePhoto,
|
|
required this.communityBannerImage,
|
|
required this.communityName,
|
|
required this.communityLocation,
|
|
required this.communityDescription,
|
|
required this.communityTypeXid,
|
|
required this.activityXid,
|
|
required this.isActive,
|
|
required this.totalGroup,
|
|
required this.totalAnnouncements,
|
|
required this.activityData,
|
|
required this.communityTypeData,
|
|
});
|
|
|
|
final int? id;
|
|
final String? communityProfilePhoto;
|
|
final String? communityBannerImage;
|
|
final String? communityName;
|
|
final String? communityLocation;
|
|
final String? communityDescription;
|
|
final int? communityTypeXid;
|
|
final int? activityXid;
|
|
final int? isActive;
|
|
final int? totalGroup;
|
|
final int? totalAnnouncements;
|
|
final ActivityData? activityData;
|
|
final CommunityTypeData? communityTypeData;
|
|
|
|
factory CommunityData.fromJson(Map<String, dynamic> json){
|
|
return CommunityData(
|
|
id: json["id"],
|
|
communityProfilePhoto: json["community_profile_photo"],
|
|
communityBannerImage: json["community_banner_image"],
|
|
communityName: json["community_name"],
|
|
communityLocation: json["community_location"],
|
|
communityDescription: json["community_description"],
|
|
communityTypeXid: json["community_type_xid"],
|
|
activityXid: json["activity_xid"],
|
|
isActive: json["is_active"],
|
|
totalGroup: json["total_group"],
|
|
totalAnnouncements: json["total_announcements"],
|
|
activityData: json["activity_data"] == null ? null : ActivityData.fromJson(json["activity_data"]),
|
|
communityTypeData: json["community_type_data"] == null ? null : CommunityTypeData.fromJson(json["community_type_data"]),
|
|
);
|
|
}
|
|
|
|
}
|
|
|
|
class ActivityData {
|
|
ActivityData({
|
|
required this.id,
|
|
required this.title,
|
|
required this.description,
|
|
required this.image,
|
|
required this.deletedAt,
|
|
required this.createdAt,
|
|
required this.updatedAt,
|
|
});
|
|
|
|
final int? id;
|
|
final String? title;
|
|
final String? description;
|
|
final String? image;
|
|
final dynamic deletedAt;
|
|
final DateTime? createdAt;
|
|
final DateTime? updatedAt;
|
|
|
|
factory ActivityData.fromJson(Map<String, dynamic> json){
|
|
return ActivityData(
|
|
id: json["id"],
|
|
title: json["title"],
|
|
description: json["description"],
|
|
image: json["image"],
|
|
deletedAt: json["deleted_at"],
|
|
createdAt: DateTime.tryParse(json["created_at"] ?? ""),
|
|
updatedAt: DateTime.tryParse(json["updated_at"] ?? ""),
|
|
);
|
|
}
|
|
|
|
}
|
|
|
|
class CommunityTypeData {
|
|
CommunityTypeData({
|
|
required this.id,
|
|
required this.name,
|
|
required this.image,
|
|
required this.description,
|
|
required this.isActive,
|
|
required this.createdBy,
|
|
required this.modifiedBy,
|
|
required this.deletedAt,
|
|
required this.createdAt,
|
|
required this.updatedAt,
|
|
});
|
|
|
|
final int? id;
|
|
final String? name;
|
|
final dynamic image;
|
|
final dynamic description;
|
|
final int? isActive;
|
|
final dynamic createdBy;
|
|
final dynamic modifiedBy;
|
|
final dynamic deletedAt;
|
|
final dynamic createdAt;
|
|
final dynamic updatedAt;
|
|
|
|
factory CommunityTypeData.fromJson(Map<String, dynamic> json){
|
|
return CommunityTypeData(
|
|
id: json["id"],
|
|
name: json["name"],
|
|
image: json["image"],
|
|
description: json["description"],
|
|
isActive: json["is_active"],
|
|
createdBy: json["created_by"],
|
|
modifiedBy: json["modified_by"],
|
|
deletedAt: json["deleted_at"],
|
|
createdAt: json["created_at"],
|
|
updatedAt: json["updated_at"],
|
|
);
|
|
}
|
|
|
|
}
|
|
|
|
class TypesOfCommunity {
|
|
TypesOfCommunity({
|
|
required this.id,
|
|
required this.name,
|
|
});
|
|
|
|
final int? id;
|
|
final String? name;
|
|
|
|
factory TypesOfCommunity.fromJson(Map<String, dynamic> json){
|
|
return TypesOfCommunity(
|
|
id: json["id"],
|
|
name: json["name"],
|
|
);
|
|
}
|
|
|
|
}
|