package shop.alien.entity.store;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;

/**
 * 支付宝直付通二级商户标准进件（ant.merchant.expand.indirect.zft.create）本地提交记录。
 */
@Data
@ApiModel(value = "AlipayZftCreateRecord对象", description = "支付宝直付通二级商户标准进件提交记录")
@TableName("alipay_zft_create_record")
public class AlipayZftCreateRecord {

    @ApiModelProperty("主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty("门店ID（可选）")
    @TableField("store_id")
    private Integer storeId;

    @ApiModelProperty("外部商户号 external_id")
    @TableField("external_id")
    private String externalId;

    @ApiModelProperty("商户名称快照")
    @TableField("merchant_name")
    private String merchantName;

    @ApiModelProperty("提交请求JSON")
    @TableField("request_json")
    private String requestJson;

    @ApiModelProperty("支付宝响应原文")
    @TableField("response_body")
    private String responseBody;

    @ApiModelProperty("是否调用成功")
    @TableField("invoke_success")
    private Boolean invokeSuccess;

    @ApiModelProperty("支付宝子错误码")
    @TableField("sub_code")
    private String subCode;

    @ApiModelProperty("支付宝子错误描述")
    @TableField("sub_msg")
    private String subMsg;

    @ApiModelProperty("订单ID")
    @TableField("order_id")
    private String orderId;

    /**
     * 进件主体：0 商户，1 律师（律师进件时按 law_firm 与 merchant_name 匹配回写律师表）。
     */
    @ApiModelProperty("类型")
    @TableField("type")
    private String type;

    @ApiModelProperty(value = "删除标记, 0:未删除, 1:已删除")
    @TableField("delete_flag")
    @TableLogic
    private Integer deleteFlag;

    @ApiModelProperty(value = "创建时间")
    @TableField(value = "created_time", fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createdTime;

    @ApiModelProperty(value = "创建人ID")
    @TableField(value = "created_user_id", fill = FieldFill.INSERT)
    private Integer createdUserId;

    @ApiModelProperty(value = "更新时间")
    @TableField(value = "updated_time", fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updatedTime;

    @ApiModelProperty(value = "更新人ID")
    @TableField(value = "updated_user_id", fill = FieldFill.INSERT_UPDATE)
    private Integer updatedUserId;

}
