package com.muchinfo.mtp3pojos.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

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

/**
 * <p>
 * 履约计划步骤表 - 导历史
 * </p>
 *
 * @author XKF
 * @since 2024-11-20
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("PERFORMANCESTEP")
@ApiModel(value="Performancestep对象", description="履约计划步骤表 - 导历史")
public class Performancestep extends Model<Performancestep> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "履约步骤ID(131+Unix秒时间戳(10位)+xxxxxx)")
    @TableId(value = "PERFORMANCESTEPID")
    private Long performancestepid;

    @ApiModelProperty(value = "所属履约计划ID")
    @TableField("PLANID")
    private Long planid;

    @ApiModelProperty(value = "步骤序号")
    @TableField("STEPINDEX")
    private Integer stepindex;

    @ApiModelProperty(value = "距离上一步天数(分钟)")
    @TableField("STEPDAYS")
    private Integer stepdays;

    @ApiModelProperty(value = "履约步骤类型ID - 1:买方支付 2:卖方收款 3:买方自提 4:卖方发货 5:买方确认货 6:卖方发票 7:买方确认票 8:仓单转移 9:释放卖方冻结  10:货款溢短 11:生成合同[中江] 12:运费 90:确认支付 91. 确认放行 92买方支付(直接扣款)   用于-1模板“")
    @TableField("STEPTYPEID")
    private Integer steptypeid;

    @ApiModelProperty(value = "步骤值")
    @TableField("STEPVALUE")
    private Long stepvalue;

    @ApiModelProperty(value = "步骤金额")
    @TableField("STEPAMOUNT")
    private BigDecimal stepamount;

    @ApiModelProperty(value = "实际完成金额")
    @TableField("REALAMOUNT")
    private BigDecimal realamount;

    @ApiModelProperty(value = "剩余天数")
    @TableField("REMAINDAYS")
    private Integer remaindays;

    @ApiModelProperty(value = "延期申请天数")
    @TableField("DELAYDAYS")
    private Integer delaydays;

    @ApiModelProperty(value = "是否自动 - 0:不自动 1:自动  - [ 默认均自动执行; 仅 1:买方支付3:买方自提 5:买方确认货 7:买方确认票  可不自动]")
    @TableField("ISAUTO")
    private Integer isauto;

    @ApiModelProperty(value = "是否最后收款步骤 - 0:不是 1:是    （暂时不用，由服务自己判断是否为最后一步付款或收款)")
    @TableField("ISLASTRECEIVESTEP")
    private Integer islastreceivestep;

    @ApiModelProperty(value = "步骤状态 -  1:待开始 2:进行中 3:已完成 4:延期(进行中) 5:失败 6:自动完成 7:超时关闭")
    @TableField("STEPSTATUS")
    private Integer stepstatus;

    @ApiModelProperty(value = "处理状态 - 1:开始 2:结束 3:冻结请求 4:冻结返回成功 5:冻结返回失败 6:扣款请求 7:扣款返回成功 8:扣款返回失败 9:仓单转移请求 10:仓单转移返回成功 11:仓单转移返回失败 12:加钱请求 13:加钱返回成功 14:加钱返回失败 15:解冻仓单头寸请求 16:解冻仓单头寸返回成功 17:解冻仓单头寸返回失败 18:解冻库位请求 19:解冻库位返回成功 20:解冻库位返回失败")
    @TableField("HANDLESTATUS")
    private Integer handlestatus;

    @ApiModelProperty(value = "步骤启动类型 - 1:系统自动 2:手动")
    @TableField("STEPLANCHTYPE")
    private Integer steplanchtype;

    @ApiModelProperty(value = "步骤执行方 - 1:买方 2:卖方")
    @TableField("EXECUTESIDE")
    private Integer executeside;

    @ApiModelProperty(value = "开始日期")
    @TableField("STARTTIME")
    private Date starttime;

    @ApiModelProperty(value = "结束日期")
    @TableField("ENDTIME")
    private Date endtime;

    @ApiModelProperty(value = "错误备注")
    @TableField("REMARK")
    private String remark;

    @ApiModelProperty(value = "步骤备注")
    @TableField("STEPREMARK")
    private String stepremark;


    @Override
    public Serializable pkVal() {
        return this.performancestepid;
    }

}
