from consts.notification_type import NotificationType
from helpers.model_to_dict import ModelToDict
from notifications.base_notification import BaseNotification


class MatchScoreNotification(BaseNotification):

    def __init__(self, match):
        self.match = match
        self._event_feed = match.event.id
        # TODO Add notion of District to Match model?

    @property
    def _type(self):
        return NotificationType.MATCH_SCORE

    def _build_dict(self):
        data = {}
        data['message_type'] = NotificationType.type_names[self._type]
        data['message_data'] = {}
        data['message_data']['event_name'] = self.match.event.get().name
        data['message_data']['match'] = ModelToDict.matchConverter(self.match)
        return data

@@ -280,19 +280,13 @@
 elf.
-_
 event
-_feed
  = m
@@ -300,10 +300,13 @@
 ent.
-id
+get()
 %0A   
@@ -314,53 +314,107 @@
     
-# TODO Add notion of District to Match model?
+self._event_feed = self.event.key_name%0A        self._district_feed = self.event.event_district_enum
 %0A%0A  
@@ -691,33 +691,21 @@
  = self.
-match.event.get()
+event
 .name%0A  

Add district feed to match score notification