Subversion Repositories SmartDukaan

Rev

Rev 36509 | Blame | Compare with Previous | Last modification | View Log | RSS feed

package com.spice.profitmandi.dao.model;

/**
 * DTO for scheme-wise earnings summary (grouped by schemeId).
 * Used by the V2 scheme earnings endpoint.
 * rolledBack amounts are excluded at the query level (rolledBackTimestamp is null).
 */
public class SchemeEarningModel {
    private int schemeId;
    private String schemeName;
    private String schemeType;
    private String brand;
    private long unitCount;
    private double totalEarned;

    public SchemeEarningModel(int schemeId, String schemeName, String schemeType, String brand,
                              Long unitCount, Double totalEarned) {
        this.schemeId = schemeId;
        this.schemeName = schemeName;
        this.schemeType = schemeType;
        this.brand = brand;
        this.unitCount = unitCount != null ? unitCount : 0L;
        this.totalEarned = totalEarned != null ? totalEarned : 0.0;
    }

    public int getSchemeId() { return schemeId; }
    public void setSchemeId(int schemeId) { this.schemeId = schemeId; }

    public String getSchemeName() { return schemeName; }
    public void setSchemeName(String schemeName) { this.schemeName = schemeName; }

    public String getSchemeType() { return schemeType; }
    public void setSchemeType(String schemeType) { this.schemeType = schemeType; }

    public String getBrand() { return brand; }
    public void setBrand(String brand) { this.brand = brand; }

    public long getUnitCount() { return unitCount; }
    public void setUnitCount(long unitCount) { this.unitCount = unitCount; }

    public double getTotalEarned() { return totalEarned; }
    public void setTotalEarned(double totalEarned) { this.totalEarned = totalEarned; }
}