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

import com.github.microservice.types.payment.PaymentType;
import com.zhongshu.card.client.type.payment.OrderNoType;
import com.zhongshu.card.server.core.domain.base.SuperMain;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.checkerframework.common.aliasing.qual.NonLeaked;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;

import java.util.Date;

/**
 * 订单的类型
 *
 * @author TRX
 * @date 2024/11/15
 */
@Data
@Document
@AllArgsConstructor
@NoArgsConstructor
@NonLeaked
public class OrderNoInfo extends SuperMain {

    @Indexed
    @Schema(description = "支付订单号")
    private String paymentNo;

    @Schema(description = "支付类型")
    private PaymentType paymentType;

    @Schema(description = "订单类型")
    private OrderNoType orderNoType;

    @Schema(description = "是否成功")
    private Boolean isSuccess;

    @Schema(description = "过期时间")
    @Indexed(expireAfterSeconds = 0)
    private Date ttl;

}
