new_contents: # -*- coding: utf-8 -*-
  
  from models.Model import Model
  
  
  class item_container:
  	"""
  	Class to interact with the item containers, such as chests.
  	"""
  
  	@staticmethod
  	def getAllFromIdArea(idArea):
  		itemContainerTypes = model.getTypes()
  		containers = model.loadBy({'id_area': idArea})
  		for k, c in enumerate(containers):
  			containers[k]['type_label'] = itemContainerTypes[containers[k]['id_item_container_type']]
  		return containers
  
  
  class model(Model):
  	"""
  	Class to interact with the values in the database.
  	"""
  
  	fields = (
  		'id_item_container',
  		'id_item_container_type',
  		'id_area',
  		'items'
  	)
  
  	@staticmethod
  	def getTypes():
  		"""
  		Returns the available types as an dict with ids as keys and labels as
  		values
  
  		@return dict the types
  		"""
  
  		query = "\
  			SELECT\
  				id_item_container_type,\
  				label\
  			FROM\
  				item_container_type\
  		"
  
  		return {t['id_item_container_type']: t['label'] for t in Model.fetchAllRows(query)}
  
  
  
  class exception(BaseException):
  	"""
  	Class for the exceptions concerning item containers.
  	"""
  	pass
  
subject: package for the item containers