package com.zhongshu.card.server.core.domain.pay;

import com.github.microservice.components.data.mongo.mongo.domain.SuperEntity;
import com.zhongshu.card.client.type.ContractState;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;

/**
 * 银联无感支付用户签约信息
 */
@Data
@Builder
@Document
@AllArgsConstructor
@NoArgsConstructor
public class ChinaumsSenselessUserSignInfo extends SuperEntity {

    /**
     * 用户id
     */
    @Indexed
    private String userId;

    /**
     * 商户签约协议号
     */
    @Indexed(unique = true)
    private String contractNo;

    /**
     * 银联受理单号
     */
    private String relateSsn;

    /**
     * 银行商户号
     */
    @Indexed
    private String mid;

    /**
     * 银商免密支付签约协议号(签约成功时返回。云闪付侧的签约协议号，由银联生成。即标记化支付信息域的token。BASE64加密。)
     */
    private String contractId;

    /**
     * 签约状态
     */
    @Indexed
    private ContractState contractState;

    /**
     * 超时时间
     */
    private Long expireTime;

    /**
     * 协议签约时间

     */
    private String contractSignedTime;

    /**
     * 协议到期时间
     */
    private String contractExpiredTime;

    /**
     * 云闪付用户id
     */
    private String acpId;

    /**
     * 云闪付小程序id
     */
    private String cqpMpAppId;

    /**
     * 云闪付小程序path
     */
    private String cqpMpPath;

    /**
     * 失效标志
     */
    private Boolean expire;
}
