import 'package:hadi_hoda_flutter/features/level/domain/entity/level_entity.dart'; import 'package:hadi_hoda_flutter/features/question/data/model/question_model.dart'; import 'package:hadi_hoda_flutter/features/question/domain/entity/question_entity.dart'; class LevelModel extends LevelEntity { LevelModel({ super.id, super.order, super.title, super.questions, }); factory LevelModel.fromJson(Map json) { return LevelModel( id: json['id'], order: json['order'], title: json['title'], questions: json['questions'] ?.map((e) => QuestionModel.fromJson(e)) .toList(), ); } }