Description

class SubscriberActivityEvent(BaseKafkaModel):
    _topic = 'subscribers_activities'
 
    def __init__(self, subscriber_id: int, channel_id: int, timestamp: int = None,
                 sent_count: int = None, delivered_count: int = None,
                 clicked_count: int = None, closed_count: int = None, 
                 subscribed_count: int = None, unsubscribed_count: int = None, 
                 filtered_count: int = None, **kwargs):
        super(SubscriberActivityEvent, self).__init__(**kwargs)
        self.subscriber_id = subscriber_id
        self.channel_id = channel_id
        self.sent_count = sent_count or 0
        self.closed_count = closed_count or 0
        self.clicked_count = clicked_count or 0
        self.delivered_count = delivered_count or 0
        self.subscribed_count = subscribed_count or 0
        self.unsubscribed_count = unsubscribed_count or 0
        self.filtered_count = filtered_count or 0
        self.timestamp = timestamp or int(time.time())