package com.boot.security.server.model;

public class AdvertiserData implements Comparable<AdvertiserData>{
    public String reportDate;
    public Integer advertiserId;
    public String advertiserName;
    public String codeId;
    public String codeName;
    public Double ecpm;
    public Double cpc;
    public Integer exposure;
    public Integer click;
    public Double income;
    public Double balance;
    public Double totalIncome;
    public Double incomeSeven;
    public Double incomeThirty;
    public Integer exposureView;
    public Integer clickView;
    public String minutes;
    public Integer platformId;
    public Long userId;

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Integer getPlatformId() {
        return platformId;
    }

    public void setPlatformId(Integer platformId) {
        this.platformId = platformId;
    }

    public String getCodeName() {
        return codeName;
    }

    public void setCodeName(String codeName) {
        this.codeName = codeName;
    }

    public String getMinutes() {
        return minutes;
    }

    public void setMinutes(String minutes) {
        this.minutes = minutes;
    }

    public Double getBalance() {
        return balance;
    }

    public void setBalance(Double balance) {
        this.balance = balance;
    }

    public Double getTotalIncome() {
        return totalIncome;
    }

    public void setTotalIncome(Double totalIncome) {
        this.totalIncome = totalIncome;
    }

    public Double getIncomeSeven() {
        return incomeSeven;
    }

    public void setIncomeSeven(Double incomeSeven) {
        this.incomeSeven = incomeSeven;
    }

    public Double getIncomeThirty() {
        return incomeThirty;
    }

    public void setIncomeThirty(Double incomeThirty) {
        this.incomeThirty = incomeThirty;
    }

    public Integer getExposureView() {
        return exposureView;
    }

    public void setExposureView(Integer exposureView) {
        this.exposureView = exposureView;
    }

    public Integer getClickView() {
        return clickView;
    }

    public void setClickView(Integer clickView) {
        this.clickView = clickView;
    }

    public String getReportDate() {
        return reportDate;
    }

    public void setReportDate(String reportDate) {
        this.reportDate = reportDate;
    }

    public Integer getAdvertiserId() {
        return advertiserId;
    }

    public void setAdvertiserId(Integer advertiserId) {
        this.advertiserId = advertiserId;
    }

    public String getAdvertiserName() {
        return advertiserName;
    }

    public void setAdvertiserName(String advertiserName) {
        this.advertiserName = advertiserName;
    }

    public String getCodeId() {
        return codeId;
    }

    public void setCodeId(String codeId) {
        this.codeId = codeId;
    }

    public Double getEcpm() {
        return ecpm;
    }

    public void setEcpm(Double ecpm) {
        this.ecpm = ecpm;
    }

    public Double getCpc() {
        return cpc;
    }

    public void setCpc(Double cpc) {
        this.cpc = cpc;
    }

    public Integer getExposure() {
        return exposure;
    }

    public void setExposure(Integer exposure) {
        this.exposure = exposure;
    }

    public Integer getClick() {
        return click;
    }

    public void setClick(Integer click) {
        this.click = click;
    }

    public Double getIncome() {
        return income;
    }

    public void setIncome(Double income) {
        this.income = income;
    }

    @Override
    public int compareTo(AdvertiserData o) {
        String s1 = this.getMinutes();
        String s2 = o.getMinutes();
        Integer hour= Integer.valueOf(s1.split(":")[0]);
        Integer minute= Integer.valueOf(s1.split(":")[1]);
        Integer hour1= Integer.valueOf(s2.split(":")[0]);
        Integer minute1= Integer.valueOf(s2.split(":")[1]);
        if(hour>hour1){
            return 1;
        }else if(hour<hour1){
            return -1;
        }else if(hour==hour1&&minute>minute1){
            return 1;
        }else {
            return -1;
        }
    }
}
