package io.delphiplatform.api.v3.bigtable.entity;

import java.time.LocalDate;

import io.delphiplatform.api.v3.constant.ChartmetricPartner;
import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
public class Chartmetric implements DspStream {

    private LocalDate date;
    private String dsp;
    private String artistId;

    private Long fans;
    private Long followers;
    private Long likes;
    private Long listeners;
    private Long popularity;
    private Long talks;
    private Long subscribers;
    private Long views;

    public Long getAppleFollowers() {
        return ChartmetricPartner.APPLE.equals(dsp) ? followers : null;
    }

    public Long getFacebookLikes() {
        return ChartmetricPartner.FACEBOOK.equals(dsp) ? likes : null;
    }

    public Long getFacebookStorytellers() {
        return ChartmetricPartner.FACEBOOK.equals(dsp) ? talks : null;
    }

    public Long getInstagramFollowers() {
        return ChartmetricPartner.INSTAGRAM.equals(dsp) ? followers : null;
    }

    public Long getSpotifyFollowers() {
        return ChartmetricPartner.SPOTIFY.equals(dsp) ? followers : null;
    }

    public Long getSpotifyPopularity() {
        return ChartmetricPartner.SPOTIFY.equals(dsp) ? popularity : null;
    }

    public Long getTwitterFollowers() {
        return ChartmetricPartner.TWITTER.equals(dsp) ? followers : null;
    }

    public Long getYoutubeChannelSubscribers() {
        return ChartmetricPartner.YOUTUBE_CHANNEL.equals(dsp) ? subscribers : null;
    }

    public Long getYoutubeChannelViews() {
        return ChartmetricPartner.YOUTUBE_CHANNEL.equals(dsp) ? views : null;
    }

}
