package com.muchinfo.mtp3pojos.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;

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

/**
 * <p>
 * 履约步骤模板表
 * </p>
 *
 * @author XKF
 * @since 2024-08-06
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("PERFORMANCESTEPTEMPLATE")
@ApiModel(value="Performancesteptemplate对象", description="履约步骤模板表")
@AllArgsConstructor
@NoArgsConstructor
@Builder
@KeySequence(value = "SEQ_PERFORMANCESTEPTEMPLATE")
public class Performancesteptemplate extends Model<Performancesteptemplate> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "AutoID")
    @TableId(value = "AUTOID", type = IdType.INPUT)
    private Long autoid;

    @ApiModelProperty(value = "履约计划模板ID")
    @TableField("TEMPLATEID")
    private Long templateid;

    @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 BigDecimal stepvalue;

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

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

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


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

}
