package com.mini.capi.biz.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.math.BigDecimal;

import com.mini.capi.model.enums.cTypeEnum;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * VIEW
 * </p>
 *
 * @author gaoxq
 * @since 2025-11-12
 */
@Getter
@Setter
@TableName("erp_summary_all_view")
public class ErpSummaryAllView implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableField("c_date")
    private String cDate;

    @TableField("c_type")
    private cTypeEnum cType;

    @TableField("this_value")
    private BigDecimal thisValue;

    @TableField("prev_value")
    private BigDecimal prevValue;

    @TableField("mom_rate")
    private BigDecimal momRate;

    @TableField("f_cycle")
    private String fCycle;


    public BigDecimal getThisValue() {
        return thisValue != null ? thisValue : BigDecimal.ZERO;
    }

    public BigDecimal getPrevValue() {
        return prevValue != null ? prevValue : BigDecimal.ZERO;
    }


    public BigDecimal getMomRate() {
        return momRate != null ? momRate : BigDecimal.ZERO;
    }
}
