class NewsAttachment {
  final int id;
  final String title;
  final String description;
  final String image;
  final String createdAt;

  const NewsAttachment({
    required this.id,
    required this.title,
    required this.description,
    required this.image,
    required this.createdAt,
  });

  factory NewsAttachment.fromJson(Map<String, dynamic> json) => NewsAttachment(
        id: json['id'],
        title: json['title'],
        description: json['description'],
        image: json['image'],
        createdAt: json['createdAt'],
      );

  Map<String, dynamic> toJson() => {
        'id': id,
        'title': title,
        'description': description,
        'image': image,
      };
}
