def to_dto(self, project):
     if project is None: return None
     dto = DTO()
     dto._key = str(project.key())
     dto._id = project.key().id()
     dto.code = project.code
     dto.name = project.name
     dto.department = project.department
     dto.created_at = project.created_at
     dto.modified_at = project.modified_at
     return dto
 def to_dto(self, participant):
     if participant is None: return None
     dto = DTO()
     dto._key = str(participant.key())
     dto._id = participant.key().id()
     dto.project_key = str(participant.project.key())
     dto.name = participant.name
     dto.created_at = participant.created_at
     dto.modified_at = participant.modified_at
     return dto