package com.njzscloud.dispose.cst.order.pojo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.njzscloud.dispose.cst.customer.constant.SettlementWay;
import com.njzscloud.dispose.cst.order.constant.PaymentStatus;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 付费记录
 *
 * @author ljw
 */
@Getter
@Setter
@ToString
@Accessors(chain = true)
@TableName(value = "cst_order_payment_record", autoResultMap = true)
public class OrderPaymentRecordEntity {

    /**
     * 主键
     */
    @TableId(type = IdType.ASSIGN_ID)
    private Long id;

    /**
     * 订单 Id
     */
    private Long orderId;

    /**
     * 订单收费项 Id，QiTa-->其他、ChanPin-->产品、YunFei-->运费
     */
    private Long expenseItemId;

    /**
     * 运输记录 Id
     */
    private Long transId;

    /**
     * 量
     */
    private BigDecimal quantity;

    /**
     * 支付状态，MianFei-->免费、WeiZhiFu-->未支付、YiZhiFu-->已支付、YiTuiKuan-->已退款
     */
    private PaymentStatus paymentStatus;

    /**
     * 支付时间
     */
    private LocalDateTime payTime;

    /**
     * 退款时间
     */
    private LocalDateTime refundTime;

    /**
     * 总金额；单位：元
     */
    private BigDecimal totalMoney;

    /**
     * 优惠金额；单位：元，有正负
     */
    private BigDecimal discountMoney;

    /**
     * 手动修正金额；单位：元，有正负
     */
    private BigDecimal reviseMoney;

    /**
     * 结算金额；单位：元
     */
    private BigDecimal settleMoney;

    /**
     * 结算方式，YueJie-->月结、YuE-->余额、XianFu-->现付
     */
    private SettlementWay settlementWay;

    /**
     * 付款人 Id；sys_user.id
     */
    private Long payerUserId;

    /**
     * 付款人客户 Id；cst_customer.id
     */
    private Long payerCustomerId;

    /**
     * 付款方资金账户 Id
     */
    private Long payerMoneyAccountId;

}
