code: def map_entity(self, entity: dal.AssetClass):
          
          obj = model.AssetClass()
  
          obj.id = entity.id
          obj.parent_id = entity.parentid
          obj.name = entity.name
          obj.allocation = entity.allocation
          obj.sort_order = entity.sortorder
          #entity.stock_links
          #entity.diff_adjustment
          if entity.parentid == None:
              obj.depth = 0
  
          return obj
docs: maps data from entity -> object