Files
nabeh/mobile/lib/features/dashboard/data/models/meta_session_model.dart
2026-05-25 00:29:42 +03:00

49 lines
1.3 KiB
Dart

// English: Model representing a connected Meta session (Facebook Page or Instagram Business Profile)
class MetaSessionModel {
final int id;
final int companyId;
final String channelType;
final String pageId;
final String pageName;
final String status;
final String? createdAt;
final String? updatedAt;
MetaSessionModel({
required this.id,
required this.companyId,
required this.channelType,
required this.pageId,
required this.pageName,
required this.status,
this.createdAt,
this.updatedAt,
});
factory MetaSessionModel.fromJson(Map<String, dynamic> json) {
return MetaSessionModel(
id: json['id'] as int,
companyId: json['company_id'] as int,
channelType: json['channel_type'] as String,
pageId: json['page_id'] as String,
pageName: json['page_name'] as String,
status: json['status'] as String,
createdAt: json['created_at'] as String?,
updatedAt: json['updated_at'] as String?,
);
}
Map<String, dynamic> toJson() {
return {
'id': id,
'company_id': companyId,
'channel_type': channelType,
'page_id': pageId,
'page_name': pageName,
'status': status,
'created_at': createdAt,
'updated_at': updatedAt,
};
}
}