from harvest.commons.notifications.base_notification import BaseNotification

class TargetNotification(BaseNotification):

  def __init__(self, stream_record, host, port):
    super().set_record_type("撮影対象")
    super().__init__(stream_record, host, port)

  def generate(self):
    self.needs_strings_dict.update(
      {
        "name": self.record["name"]
      }
    )
    if self.is_modify_event:
      self.needs_strings_dict.update(
        {
          "old_name": self.old_record["name"]
        }
      )
    return super().generate()
