'Returns a database representation of an Order object.
:rtype: tuple'

def to_database(self):

    completed_timestamp = (float(self.completed_timestamp) if self.completed_timestamp else None)
    return (unicode(self.order_id.trader_id), unicode(self.order_id.order_number), float(self.price), unicode(self.price.wallet_id), float(self.total_quantity), unicode(self.total_quantity.wallet_id), float(self.traded_quantity), float(self.timeout), float(self.timestamp), completed_timestamp, self.is_ask(), self._cancelled)
