package com.ruoyi.member.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.*;
import com.ruoyi.common.core.domain.DlBaseEntity;

/**
 * 订单对象 dl_member_order
 * 
 * @author pqz
 * @date 2025-03-17
 */
@TableName("dl_member_order")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class MemberOrder extends DlBaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 唯一主键 */
    @TableId(type = IdType.ASSIGN_UUID)
    private String id;

    /** 用户id */
    @Excel(name = "用户id")
    private Long userId;

    /** 用户类型（数据字典：dl_user_type） */
    @Excel(name = "用户类型", readConverterExp = "数=据字典：dl_user_type")
    private String userType;

    /** 用户昵称 */
    @Excel(name = "用户昵称")
    private String nickname;

    /** 订单编号 */
    @Excel(name = "订单编号")
    private String orderNo;

    /** 订单类型（数据字典：dl_order_type） */
    @Excel(name = "订单类型", readConverterExp = "数=据字典：dl_order_type")
    private String orderType;

    /** 商品id(前期就是会员卡id、通告券id) */
    @Excel(name = "商品id(前期就是会员卡id、通告券id)")
    private String goodsId;

    /** 商品数量 */
    @Excel(name = "商品数量")
    private Integer goodsNum;

    /** 商品服务周期 */
    @Excel(name = "商品服务周期")
    private String goodsCycle;

    /** 订单总价 */
    @Excel(name = "订单总价")
    private BigDecimal goodsPrice;

    /** 支付时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "支付时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date payTime;

    /** 下单描述 */
    @Excel(name = "下单描述")
    private String content;

    /** 支付方式(数据字典：dl_pay_way) */
    @Excel(name = "支付方式(数据字典：dl_pay_way)")
    private String payWay;

    /** 是否已支付（0待支付|1已支付） */
    @Excel(name = "是否已支付", readConverterExp = "0=待支付|1已支付")
    private Integer isPay;

    /** 是否退款(0未退款|1已退款) */
    @Excel(name = "是否退款(0未退款|1已退款)")
    private Integer isRefund;

    /** 退款人id */
    @Excel(name = "退款人id")
    private Long refundUserId;

    /** 退款方式(数据字典：dl_pay_way) */
    @Excel(name = "退款方式(数据字典：dl_pay_way)")
    private String refundWay;

    /** 退款单号 */
    @Excel(name = "退款单号")
    private String refundNo;

    /** 退款发起时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "退款发起时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date refundApplyTime;

    /** 退款到账时间 */
    @Excel(name = "退款到账时间")
    private String refundReceiveTime;

    /** 退款理由 */
    @Excel(name = "退款理由")
    private String refundReason;

    /** 备注（保留字段） */
    @Excel(name = "备注", readConverterExp = "保=留字段")
    private String remark;

}
