package org.springblade.modules.api.response;

import cn.hutool.core.date.DateUtil;
import lombok.Data;
import org.springblade.common.enums.OrderStateEnum;
import org.springblade.common.enums.PaymentTypeEnum;
import org.springblade.modules.finance.entity.AfterSales;
import org.springblade.modules.groupon.vo.SelfTakeVO;
import org.springblade.modules.mall.vo.StoreVO;

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

@Data
public class UserOrderDetailResponse extends UserOrderResponse {
    private String paymentMode;
    private BigDecimal paymentAmount;
    private BigDecimal totalAmount;
    private long remainTime;
    private SelfTakeVO selfTake;
    private Long selfTakeId;
    private String paymentModeDesc;
    private Date paymentTime;
    private String refundNo;
    private Date refundApplyTime;
    private BigDecimal refundAmount;
    private String afterSalesReason;
    private String afterSalesDesc;
    private StoreVO store;
    private AfterSales afterSales;

    public String getPaymentModeDesc() {
        return PaymentTypeEnum.getNameByValue(this.paymentMode);
    }
}
