/*
 * Copyright [2022] [https://www.xiaonuo.vip]
 *
 * Snowy采用APACHE LICENSE 2.0开源协议，您在使用过程中，需要注意以下几点：
 *
 * 1.请不要删除和修改根目录下的LICENSE文件。
 * 2.请不要删除和修改Snowy源码头部的版权声明。
 * 3.本项目代码可免费商业使用，商业使用请保留源码和相关描述文件的项目出处，作者声明等。
 * 4.分发源码时候，请注明软件出处 https://www.xiaonuo.vip
 * 5.不可二次分发开源参与同类竞品，如有想法可联系团队xiaonuobase@qq.com商议合作。
 * 6.若您的项目无法满足以上几点，需要更多功能代码，获取Snowy商业授权许可，请在官网购买授权，地址为 https://www.xiaonuo.vip
 */
package vip.xiaonuo.biz.modular.depotGrainInfoWarn.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import vip.xiaonuo.biz.core.Const.BizStr;
import vip.xiaonuo.biz.modular.depotGrain.entity.BaseDepotGrainName;

import java.math.BigDecimal;

/**
 * 客户预警处理实体
 *
 * @author xiang
 * @date  2023/09/14 16:20
 **/
@Getter
@Setter
@TableName("DEPOT_GRAIN_INFO_WARN")
public class DepotGrainInfoWarn extends BaseDepotGrainName {

    /** ID */
    @TableId
    @ApiModelProperty(value = "ID", position = 1)
    private String id;

    /** 项目编码 */
    @ApiModelProperty(value = "项目编码", position = 2)
    private String depotId;

    /** 关联异常id */
    @ApiModelProperty(value = "关联异常id", position = 3)
    private String unionAlarmId;

    /** 贷款日期 */
    @ApiModelProperty(value = "贷款日期", position = 4)
    private String loanDate;

    /** 贷款到期日 */
    @ApiModelProperty(value = "贷款到期日", position = 5)
    private String loanEndDate;

    /** 粮食种类 */
    @ApiModelProperty(value = "粮食种类", position = 6)
    private String grainGroup;

    /** 平均价格 */
    @ApiModelProperty(value = "平均价格", position = 7)
    private BigDecimal loanPrice;

    /** 主流价格 */
    @ApiModelProperty(value = "主流价格", position = 8)
    private BigDecimal zonePrice;

    /** 预警价格等级:黄/红 */
    @ApiModelProperty(value = "预警价格等级:黄/红", position = 9)
    private String warnColourLevel;

    /** 处理状态 */
    @ApiModelProperty(value = "处理状态", position = 11)
    private String saveState;

    /** 处理时间 */
    @ApiModelProperty(value = "处理时间", position = 11)
    private String saveTime;

    /** 异常分类:价格/到期日 */
    @ApiModelProperty(value = "异常分类:价格/到期日", position = 12)
    private String warnType;

    /** 异常信息 */
    @ApiModelProperty(value = "异常信息", position = 13)
    private String warnMsg;

    public DepotGrainInfoWarn() {
    }

    public DepotGrainInfoWarn(String depotId, String grainGroup, String saveState) {
        this.depotId = depotId;
        this.grainGroup = grainGroup;
        this.saveState = saveState;
    }

    public DepotGrainInfoWarn(String depotId, String grainGroup, String saveState, String warnType) {
        this.depotId = depotId;
        this.grainGroup = grainGroup;
        this.saveState = saveState;
        this.warnType = warnType;
    }

    //到期日风险
    public DepotGrainInfoWarn(String depotId, String loanDate, String loanEndDate, String warnColourLevel, String warnMsg) {
        this.depotId = depotId;
        this.loanDate = loanDate;
        this.loanEndDate = loanEndDate;
        this.warnColourLevel = warnColourLevel;
        this.saveState = BizStr.STATE_PROCESS_N;
        this.warnType = BizStr.WARN_TYPE_DATE;
        this.warnMsg = warnMsg;
    }

}
