Subversion Repositories SmartDukaan

Rev

Rev 32432 | View as "text/plain" | Blame | Compare with Previous | Last modification | View Log | RSS feed

package com.spice.profitmandi.dao.model;

import com.spice.profitmandi.dao.entity.fofo.PartnerDailyInvestment;
import com.spice.profitmandi.dao.entity.fofo.PartnerType;

import java.io.Serializable;
import java.util.Objects;

public class PartnerDetailModel implements Serializable {

        /**
         * 
         */
        private static final long serialVersionUID = 1L;
        private int lmtd;
        private int mtd;
        private int lms;
        private int secondarylms;
        private int secondarymtd;
        private int secondarylmtd;
        private int ticket;
        private int hygiene;
        private int totalHygiene;
        private int count;
        private int todayTertiary;
        private long lastThreeDaytertiary;
        private int walletAmount;
        private String authUser;
        private String rbms;
        private PartnerType partnerType;
        private long investment_ok;
        private int fofoId;

        public int getFofoId() {
                return fofoId;
        }

        public void setFofoId(int fofoId) {
                this.fofoId = fofoId;
        }

        public long getInvestment_ok() {
                return investment_ok;
        }

        public void setInvestment_ok(long investment_ok) {
                this.investment_ok = investment_ok;
        }

        public int getLms() {
                return lms;
        }

        public void setLms(int lms) {
                this.lms = lms;
        }

        public double getSaleDiff() {
                return mtd - lmtd;
        }

        public int getSecondarylms() {
                return secondarylms;
        }

        public void setSecondarylms(int secondarylms) {
                this.secondarylms = secondarylms;
        }

        public int getSecondarymtd() {
                return secondarymtd;
        }

        public void setSecondarymtd(int secondarymtd) {
                this.secondarymtd = secondarymtd;
        }

        public int getSecondarylmtd() {
                return secondarylmtd;
        }

        public void setSecondarylmtd(int secondarylmtd) {
                this.secondarylmtd = secondarylmtd;
        }

        public PartnerType getPartnerType() {
                return partnerType != null ? partnerType : PartnerType.NEW;
        }

        public void setPartnerType(PartnerType partnerType) {
                this.partnerType = partnerType;
        }

        public String getAuthUser() {
                return authUser;
        }

        public void setAuthUser(String authUser) {
                this.authUser = authUser;
        }

        public int getWalletAmount() {
                return walletAmount;
        }

        public void setWalletAmount(int walletAmount) {
                this.walletAmount = walletAmount;
        }

        public long getLastThreeDaytertiary() {
                return lastThreeDaytertiary;
        }

        public void setLastThreeDaytertiary(long lastThreeDaytertiary) {
                this.lastThreeDaytertiary = lastThreeDaytertiary;
        }

        public int getCount() {
                return count;
        }

        public void setCount(int count) {
                this.count = count;
        }

        private PartnerDailyInvestment investment;
        private int leads;

        public int getLeads() {
                return leads;
        }

        public void setLeads(int leads) {
                this.leads = leads;
        }

        public int getTotalHygiene() {
                return totalHygiene;
        }

        public void setTotalHygiene(int totalHygiene) {
                this.totalHygiene = totalHygiene;
        }

        public int getTicket() {
                return ticket;
        }

        public double getHygienePercentage() {
                if (this.totalHygiene == 0) {
                        return 0;
                }
                return ((this.hygiene * 1.0) / this.totalHygiene) * 100;
        }

        public String getRbms() {
                return rbms;
        }

        public void setRbms(String rbms) {
                this.rbms = rbms;
        }

        public void setTicket(int ticket) {
                this.ticket = ticket;
        }

        public PartnerDailyInvestment getInvestment() {
                return investment;
        }

        public void setInvestment(PartnerDailyInvestment investment) {
                this.investment = investment;
        }

        public int getLmtd() {
                return lmtd;
        }

        public void setLmtd(int lmtd) {
                this.lmtd = lmtd;
        }

        public int getMtd() {
                return mtd;
        }

        public void setMtd(int mtd) {
                this.mtd = mtd;
        }

        public int getTodayTertiary() {
                return todayTertiary;
        }

        public void setTodayTertiary(int todayTertiary) {
                this.todayTertiary = todayTertiary;
        }

        public int getHygiene() {
                return hygiene;
        }

        public void setHygiene(int hygiene) {
                this.hygiene = hygiene;
        }

        @Override
        public int hashCode() {
                return Objects.hash(authUser, count, fofoId, hygiene, investment, investment_ok, lastThreeDaytertiary, leads,
                                lms, lmtd, mtd, partnerType, secondarylms, secondarylmtd, secondarymtd, ticket, todayTertiary,
                                totalHygiene, walletAmount);
        }

        @Override
        public boolean equals(Object obj) {
                if (this == obj)
                        return true;
                if (obj == null)
                        return false;
                if (getClass() != obj.getClass())
                        return false;
                PartnerDetailModel other = (PartnerDetailModel) obj;
                return Objects.equals(authUser, other.authUser) && count == other.count && fofoId == other.fofoId
                                && hygiene == other.hygiene && Objects.equals(investment, other.investment)
                                && investment_ok == other.investment_ok && lastThreeDaytertiary == other.lastThreeDaytertiary
                                && leads == other.leads && lms == other.lms && lmtd == other.lmtd && mtd == other.mtd
                                && partnerType == other.partnerType && secondarylms == other.secondarylms
                                && secondarylmtd == other.secondarylmtd && secondarymtd == other.secondarymtd && ticket == other.ticket
                                && todayTertiary == other.todayTertiary && totalHygiene == other.totalHygiene
                                && walletAmount == other.walletAmount;
        }

        @Override
        public String toString() {
                return "PartnerDetailModel{" +
                                "lmtd=" + lmtd +
                                ", mtd=" + mtd +
                                ", lms=" + lms +
                                ", secondarylms=" + secondarylms +
                                ", secondarymtd=" + secondarymtd +
                                ", secondarylmtd=" + secondarylmtd +
                                ", ticket=" + ticket +
                                ", hygiene=" + hygiene +
                                ", totalHygiene=" + totalHygiene +
                                ", count=" + count +
                                ", todayTertiary=" + todayTertiary +
                                ", lastThreeDaytertiary=" + lastThreeDaytertiary +
                                ", walletAmount=" + walletAmount +
                                ", authUser='" + authUser + '\'' +
                                ", rbms='" + rbms + '\'' +
                                ", partnerType=" + partnerType +
                                ", investment_ok=" + investment_ok +
                                ", fofoId=" + fofoId +
                                ", investment=" + investment +
                                ", leads=" + leads +
                                '}';
        }
}