toEntity method
Implementation
Topic toEntity() {
return Topic(
id: id,
bookId: bookId,
domainId: domainId,
parentTopicId: parentTopicId,
title: title,
depth: depth,
sortOrder: sortOrder,
pageStart: pageStart,
pageEnd: pageEnd,
curriculumLevelId: curriculumLevelId,
children: children.map((c) => c.toEntity()).toList(),
);
}