OnlinePaymentRequest.java 1.26 KB
package com.diligrp.cashier.pipeline.domain;

import com.diligrp.cashier.shared.domain.ContainerSupport;

import java.time.LocalDateTime;
import java.util.Map;

/**
 * 预支付申请模型
 */
public class OnlinePaymentRequest extends ContainerSupport {
    // 支付ID
    protected final String paymentId;
    // 交易金额 - 分
    protected final long amount;
    // 商品描述
    protected final String goods;
    // 交易备注
    protected final String description;
    // 交易时间
    protected final LocalDateTime when;

    public OnlinePaymentRequest(String paymentId, long amount, String goods, String description, LocalDateTime when) {
        this.paymentId = paymentId;
        this.amount = amount;
        this.goods = goods;
        this.description = description;
        this.when = when;
    }

    public String getPaymentId() {
        return paymentId;
    }

    public long getAmount() {
        return amount;
    }

    public String getGoods() {
        return goods;
    }

    public String getDescription() {
        return description;
    }

    public LocalDateTime getWhen() {
        return when;
    }

    public void putParams(Map<String, Object> params) {
        if (params != null) {
            putAll(params);
        }
    }
}