class Topic {
  final String id;
  final String name;
  final String description;
  final bool isCompleted;

  Topic({
    required this.id,
    required this.name,
    required this.description,
    required this.isCompleted,
  });

  factory Topic.fromJson(Map<String, dynamic> json) {
    return Topic(
      id: json['ID_TOPIC'] ?? '',
      name: json['NAME_TOPIC'] ?? '',
      description: json['DESCRIPTION_TOPIC'] ?? '',
      isCompleted: json['IS_COMPLETED'] == 1,
    );
  }
}
