package com.ruoyi.web.modules.trading.domain;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonSetter;
import com.fasterxml.jackson.databind.JsonNode;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 日度市场行情 biz_market_daily_quote
 */
public class BizMarketDailyQuote extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    private Long id;

    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date quoteDate;

    private String provinceCode;

    private String provinceName;

    private String cityCode;

    private String cityName;

    private String countyCode;

    private String countyName;

    private Long tradeMarketId;

    private Integer cattleGender;

    private Integer weightGrade;

    private Integer growthStage;

    private Integer ageMonthGrade;

    private Integer fatGrade;

    private BigDecimal priceMin;

    private BigDecimal priceMax;

    private Integer priceUnit;

    private BigDecimal avgPrice;

    private Integer supplyStatus;

    private String changeFactors;

    private BigDecimal probRise;

    private BigDecimal probFlat;

    private BigDecimal probFall;

    private String outboundAdvice;

    private String delFlag;

    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date beginQuoteDate;

    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date endQuoteDate;

    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private String tradeMarketName;

    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private String cattleGenderName;

    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private String weightGradeName;

    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private String growthStageName;

    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private String ageMonthGradeName;

    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private String fatGradeName;

    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private String priceUnitName;

    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private String supplyStatusName;

    private List<Integer> changeFactorList;

    private List<String> changeFactorNames;

    public Long getId()
    {
        return id;
    }

    public void setId(Long id)
    {
        this.id = id;
    }

    public Date getQuoteDate()
    {
        return quoteDate;
    }

    public void setQuoteDate(Date quoteDate)
    {
        this.quoteDate = quoteDate;
    }

    public String getProvinceCode()
    {
        return provinceCode;
    }

    public void setProvinceCode(String provinceCode)
    {
        this.provinceCode = provinceCode;
    }

    public String getProvinceName()
    {
        return provinceName;
    }

    public void setProvinceName(String provinceName)
    {
        this.provinceName = provinceName;
    }

    public String getCityCode()
    {
        return cityCode;
    }

    public void setCityCode(String cityCode)
    {
        this.cityCode = cityCode;
    }

    public String getCityName()
    {
        return cityName;
    }

    public void setCityName(String cityName)
    {
        this.cityName = cityName;
    }

    public String getCountyCode()
    {
        return countyCode;
    }

    public void setCountyCode(String countyCode)
    {
        this.countyCode = countyCode;
    }

    public String getCountyName()
    {
        return countyName;
    }

    public void setCountyName(String countyName)
    {
        this.countyName = countyName;
    }

    public Long getTradeMarketId()
    {
        return tradeMarketId;
    }

    public void setTradeMarketId(Long tradeMarketId)
    {
        this.tradeMarketId = tradeMarketId;
    }

    public Integer getCattleGender()
    {
        return cattleGender;
    }

    public void setCattleGender(Integer cattleGender)
    {
        this.cattleGender = cattleGender;
    }

    public Integer getWeightGrade()
    {
        return weightGrade;
    }

    public void setWeightGrade(Integer weightGrade)
    {
        this.weightGrade = weightGrade;
    }

    public Integer getGrowthStage()
    {
        return growthStage;
    }

    public void setGrowthStage(Integer growthStage)
    {
        this.growthStage = growthStage;
    }

    public Integer getAgeMonthGrade()
    {
        return ageMonthGrade;
    }

    public void setAgeMonthGrade(Integer ageMonthGrade)
    {
        this.ageMonthGrade = ageMonthGrade;
    }

    public Integer getFatGrade()
    {
        return fatGrade;
    }

    public void setFatGrade(Integer fatGrade)
    {
        this.fatGrade = fatGrade;
    }

    public BigDecimal getPriceMin()
    {
        return priceMin;
    }

    public void setPriceMin(BigDecimal priceMin)
    {
        this.priceMin = priceMin;
    }

    public BigDecimal getPriceMax()
    {
        return priceMax;
    }

    public void setPriceMax(BigDecimal priceMax)
    {
        this.priceMax = priceMax;
    }

    public Integer getPriceUnit()
    {
        return priceUnit;
    }

    public void setPriceUnit(Integer priceUnit)
    {
        this.priceUnit = priceUnit;
    }

    public BigDecimal getAvgPrice()
    {
        return avgPrice;
    }

    public void setAvgPrice(BigDecimal avgPrice)
    {
        this.avgPrice = avgPrice;
    }

    public Integer getSupplyStatus()
    {
        return supplyStatus;
    }

    public void setSupplyStatus(Integer supplyStatus)
    {
        this.supplyStatus = supplyStatus;
    }

    public String getChangeFactors()
    {
        return changeFactors;
    }

    /** 仅持久化/MyBatis 使用；JSON 入参请走 {@link #setChangeFactorList(List)}。 */
    @JsonIgnore
    public void setChangeFactors(String changeFactors)
    {
        this.changeFactors = changeFactors;
    }

    public BigDecimal getProbRise()
    {
        return probRise;
    }

    public void setProbRise(BigDecimal probRise)
    {
        this.probRise = probRise;
    }

    public BigDecimal getProbFlat()
    {
        return probFlat;
    }

    public void setProbFlat(BigDecimal probFlat)
    {
        this.probFlat = probFlat;
    }

    public BigDecimal getProbFall()
    {
        return probFall;
    }

    public void setProbFall(BigDecimal probFall)
    {
        this.probFall = probFall;
    }

    public String getOutboundAdvice()
    {
        return outboundAdvice;
    }

    public void setOutboundAdvice(String outboundAdvice)
    {
        this.outboundAdvice = outboundAdvice;
    }

    public String getDelFlag()
    {
        return delFlag;
    }

    public void setDelFlag(String delFlag)
    {
        this.delFlag = delFlag;
    }

    public Date getBeginQuoteDate()
    {
        return beginQuoteDate;
    }

    public void setBeginQuoteDate(Date beginQuoteDate)
    {
        this.beginQuoteDate = beginQuoteDate;
    }

    public Date getEndQuoteDate()
    {
        return endQuoteDate;
    }

    public void setEndQuoteDate(Date endQuoteDate)
    {
        this.endQuoteDate = endQuoteDate;
    }

    public String getTradeMarketName()
    {
        return tradeMarketName;
    }

    public void setTradeMarketName(String tradeMarketName)
    {
        this.tradeMarketName = tradeMarketName;
    }

    public String getCattleGenderName()
    {
        return cattleGenderName;
    }

    public void setCattleGenderName(String cattleGenderName)
    {
        this.cattleGenderName = cattleGenderName;
    }

    public String getWeightGradeName()
    {
        return weightGradeName;
    }

    public void setWeightGradeName(String weightGradeName)
    {
        this.weightGradeName = weightGradeName;
    }

    public String getGrowthStageName()
    {
        return growthStageName;
    }

    public void setGrowthStageName(String growthStageName)
    {
        this.growthStageName = growthStageName;
    }

    public String getAgeMonthGradeName()
    {
        return ageMonthGradeName;
    }

    public void setAgeMonthGradeName(String ageMonthGradeName)
    {
        this.ageMonthGradeName = ageMonthGradeName;
    }

    public String getFatGradeName()
    {
        return fatGradeName;
    }

    public void setFatGradeName(String fatGradeName)
    {
        this.fatGradeName = fatGradeName;
    }

    public String getPriceUnitName()
    {
        return priceUnitName;
    }

    public void setPriceUnitName(String priceUnitName)
    {
        this.priceUnitName = priceUnitName;
    }

    public String getSupplyStatusName()
    {
        return supplyStatusName;
    }

    public void setSupplyStatusName(String supplyStatusName)
    {
        this.supplyStatusName = supplyStatusName;
    }

    public List<Integer> getChangeFactorList()
    {
        return changeFactorList;
    }

    public void setChangeFactorList(List<Integer> changeFactorList)
    {
        this.changeFactorList = changeFactorList;
    }

    /**
     * 入参：前端提交整型数组 [1,3] 或逗号串 "1,3"（与技术方案一致）。
     */
    @JsonSetter("changeFactors")
    public void bindChangeFactors(JsonNode node)
    {
        if (node == null || node.isNull())
        {
            return;
        }
        if (node.isArray())
        {
            List<Integer> list = new java.util.ArrayList<>();
            for (JsonNode item : node)
            {
                list.add(item.asInt());
            }
            this.changeFactorList = list;
            return;
        }
        if (node.isTextual())
        {
            this.changeFactors = node.asText();
        }
    }

    public List<String> getChangeFactorNames()
    {
        return changeFactorNames;
    }

    public void setChangeFactorNames(List<String> changeFactorNames)
    {
        this.changeFactorNames = changeFactorNames;
    }
}
