'Return object data in easily serializable format'

@property
def serialize(self):

    return {'id': self.id, 'code': self.code, 'discount_url': self.discount_url, 'value': self.value, 'type': self.type, 'tickets_number': self.tickets_number, 'min_quantity': self.min_quantity, 'max_quantity': self.max_quantity, 'used_for': self.used_for, 'valid_from': self.valid_from, 'valid_till': self.valid_till, 'event_id': self.event_id, 'is_active': self.is_active}
