# Copyright (c) 2015, Xhive Global Ltd. and contributors
# License: MIT. See LICENSE

import xhiveframework
from xhiveframework.model.document import Document


class UnhandledEmail(Document):
	pass


def remove_old_unhandled_emails():
	xhiveframework.db.delete(
		"Unhandled Email", {"creation": ("<", xhiveframework.utils.add_days(xhiveframework.utils.nowdate(), -30))}
	)
