package com.zhongshu.card.client.model.payment;

import com.github.microservice.types.deviceUse.OrderFromType;
import com.github.microservice.types.OrderModeType;
import com.github.microservice.types.payment.ChargeableType;
import com.github.microservice.types.payment.PaymentDeviceType;
import com.github.microservice.types.payment.PaymentType;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author TRX
 * @date 2025/1/16
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class CreateOrderParam {

    @Schema(description = "消息ID")
    private String mqttDataId;

    @Schema(description = "订单方式")
    private OrderModeType orderModeType = OrderModeType.Consume;

    @Schema(description = "是否是设备订单")
    private Boolean isDeviceOrder = Boolean.TRUE;

    @Schema(description = "设备ID")
    private String deviceId;

    @Schema(description = "订单计费方式，定额支付")
    private ChargeableType chargeableType = ChargeableType.Specified;

    @Schema(description = "订单来源、支付来源")
    private OrderFromType orderFromType;

    @Schema(description = "服务id、商品id")
    private String productProvideId;

    @Schema(description = "消费序号(年月日时分秒+2个字节序号(0~65535))，用于识别上传数据不重复")
    private String orderNo;

    @Schema(description = "10进制卡序列号（实体卡号或虚拟卡号）")
    private String cardNo;

    @Schema(description = "消费金额(Mode为2时，此字段传入值可能为0)")
    private String amount;

    @Schema(description = "是否指定支付渠道")
    private Boolean appointPaymentType = Boolean.FALSE;

    @Schema(description = "支付方式")
    private PaymentType paymentType;

    @Schema(description = "支付设备和方式")
    private PaymentDeviceType paymentDeviceType;

    @Schema(description = "下单用户")
    private String userId;

    @Schema(description = "是否允许匿名下单")
    private Boolean isAnonymous = Boolean.FALSE;

    @Schema(description = "消费类型，如：餐饮消费、水费、电费 等等")
    private String payType;

    @Schema(description = "订单支付有效期时间，毫秒")
    private Long expirationTime;

    @Schema(description = "微信小程序的openId")
    private String openId;

}
