package com.qunzhixinxi.hnqz.admin.api.dto;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.Getter;

import java.io.Serializable;
import java.util.Map;

/**
 * 自由职家的统一请求参数
 *
 * @author lixuesong
 * @date 2022年04月18日 12:00
 */
@Data
public class OladingCommonRequest implements Serializable {

	private static final long serialVersionUID = -467629451978460444L;

	/**
	 * 数据报文
	 */
//	@NotNull(message = "req必填")
	private String req;

	/**
	 * base64编码的签名数据
	 */
//	@NotEmpty(message = "sign必填")
	private String sign;


	/**
	 * 数据报文
	 */
	@Data
	public static class Req implements Serializable {

		private static final long serialVersionUID = 2615670481019232417L;

		/**
		 * 接口名称
		 */
		private String name;

		/**
		 * 错误码
		 */
		private String code;

		/**
		 * 描述信息
		 */
		private String message;

		/**
		 * 接口业务数据
		 */
		private Map<String, Object> data;
	}

	/**
	 * 接口名称枚举
	 */
	@Getter
	@AllArgsConstructor
	public enum InterfaceName {

		// 接口名称
		SIGN_UP("签约回调"),
		UPLOAD_ID_CARD_IMAGE("证照上传回调"),
		UPLOAD_TAXPAYER_AGREEMENT("上传企业纳税人协议回调"),
		CREATE_ORDER_V2("创建代付订单"),
		CREATE_ORDER_DETAIL("阿拉钉内部打款订单回调");

		/**
		 * 描述
		 */
		private final String desc;
	}

	/**
	 * 签约状态；包括已签约、未签约
	 */
	@Getter
	@AllArgsConstructor
	public enum SignUpStatus {

		// 签约状态
		UN_SIGN(0, "未签约"),
		SIGN(1, "已签约");

		private final Integer code;

		private final String message;
	}

	/**
	 * 证件照处理状态；已受理、认证通过、认证失败、纳税人信息不存在、证照未上传
	 */
	@Getter
	@AllArgsConstructor
	public enum UploadIdCardImageStatus {

		// 证件照处理状态
		ACCEPT(0, "已受理"),
		IDENTIFY_SUCCESS(1, "认证通过"),
		IDENTIFY_FAIL(2, "认证失败"),
		NULL(3, "纳税人信息不存在"),
		UN_IDENTIFY(4, "证照未上传");

		private final Integer code;

		private final String message;
	}

	/**
	 * 协议上传状态；已受理、上传成功、上传失败
	 */
	@Getter
	@AllArgsConstructor
	public enum UploadTaxpayerAgreementStatus {

		// 协议上传状态
		ACCEPT(0, "已受理"),
		SUCCESS(1, "上传成功"),
		FAIL(2, "上传失败");

		private final Integer code;

		private final String message;
	}

	/**
	 * 创建代付订单状态
	 */
	@Getter
	@AllArgsConstructor
	public enum CreateOrderV2Status {
		ACCEPT("已受理"),
		CLOSE("已关闭");

		private final String status;

	}


	/**
	 * 创建代付订单状态
	 */
	@Getter
	@AllArgsConstructor
	public enum RemitStatusStatus {
		ACCEPT("出款中"),
		REMIT("已成功"),
		FAIL("已失败");

		private final String status;

	}
}
