package com.zg.project.wisdom.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.zg.framework.aspectj.lang.annotation.Excel;
import com.zg.framework.web.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 签字记录对象 audit_signature
 */
public class AuditSignature extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /** 主键ID */
    private Long id;

    /** 单据编号 */
    @Excel(name = "单据编号")
    private String billNo;

    /** 入库记录ID（物理外键，绑定rk_info.id） */
    @Excel(name = "入库记录ID")
    private Long rkId;

    /** 单据类型（0入库 1出库） */
    @Excel(name = "单据类型")
    private String billType;

    /** 签字人ID */
    @Excel(name = "签字人ID")
    private String signerId;

    /** 审批人ID */
    @Excel(name = "审批人ID")
    private String approverId;

    /** 审批人签字图片URL */
    @Excel(name = "审批人签字图片URL")
    private String approverSignUrl;

    /** 签字人角色（0发起人 1审批人 2拍照人） */
    @Excel(name = "签字人角色")
    private String signerRole;

    /** 签名图片URL */
    @Excel(name = "签名图片URL")
    private String signUrl;

    /** 签字时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "签字时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date signTime;

    /** 库位码 */
    @Excel(name = "库位码")
    private String pcode;

    /** 托盘码 */
    @Excel(name = "托盘码")
    private String trayCode;

    /** 审核结果（0通过 1驳回） */
    @Excel(name = "审核结果")
    private String auditResult;

    /** 是否当前有效签字（1是 0否） */
    @Excel(name = "当前有效")
    private String isCurrent;

    /** 图片类型（0签字 1现场图） */
    @Excel(name = "图片类型")
    private String imageType;

    /** 备注 */
    @Excel(name = "备注")
    private String remark;

    /** 逻辑删除（0正常 1删除） */
    private String isDelete;

    // ===== Getter & Setter =====

    public Long getId() {
        return id;
    }

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

    public String getBillNo() {
        return billNo;
    }

    public void setBillNo(String billNo) {
        this.billNo = billNo;
    }

    public Long getRkId() {
        return rkId;
    }

    public void setRkId(Long rkId) {
        this.rkId = rkId;
    }

    public String getBillType() {
        return billType;
    }

    public void setBillType(String billType) {
        this.billType = billType;
    }

    public String getSignerId() {
        return signerId;
    }

    public void setSignerId(String signerId) {
        this.signerId = signerId;
    }

    public String getApproverId() {
        return approverId;
    }

    public void setApproverId(String approverId) {
        this.approverId = approverId;
    }

    public String getApproverSignUrl() {
        return approverSignUrl;
    }

    public void setApproverSignUrl(String approverSignUrl) {
        this.approverSignUrl = approverSignUrl;
    }

    public String getSignerRole() {
        return signerRole;
    }

    public void setSignerRole(String signerRole) {
        this.signerRole = signerRole;
    }

    public String getSignUrl() {
        return signUrl;
    }

    public void setSignUrl(String signUrl) {
        this.signUrl = signUrl;
    }

    public Date getSignTime() {
        return signTime;
    }

    public void setSignTime(Date signTime) {
        this.signTime = signTime;
    }

    public String getPcode() {
        return pcode;
    }

    public void setPcode(String pcode) {
        this.pcode = pcode;
    }

    public String getTrayCode() {
        return trayCode;
    }

    public void setTrayCode(String trayCode) {
        this.trayCode = trayCode;
    }

    public String getAuditResult() {
        return auditResult;
    }

    public void setAuditResult(String auditResult) {
        this.auditResult = auditResult;
    }

    public String getIsCurrent() {
        return isCurrent;
    }

    public void setIsCurrent(String isCurrent) {
        this.isCurrent = isCurrent;
    }

    public String getImageType() {
        return imageType;
    }

    public void setImageType(String imageType) {
        this.imageType = imageType;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getIsDelete() {
        return isDelete;
    }

    public void setIsDelete(String isDelete) {
        this.isDelete = isDelete;
    }

    // ===== toString =====

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("billNo", getBillNo())
                .append("rkId", getRkId())
                .append("billType", getBillType())
                .append("signerId", getSignerId())
                .append("approverId", getApproverId())
                .append("approverSignUrl", getApproverSignUrl())
                .append("signerRole", getSignerRole())
                .append("signUrl", getSignUrl())
                .append("signTime", getSignTime())
                .append("pcode", getPcode())
                .append("trayCode", getTrayCode())
                .append("auditResult", getAuditResult())
                .append("isCurrent", getIsCurrent())
                .append("imageType", getImageType())
                .append("remark", getRemark())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("isDelete", getIsDelete())
                .toString();
    }
}
