package org.dromara.work.domain.vo;

import org.dromara.work.domain.TpUserRecord;
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
import cn.idev.excel.annotation.ExcelProperty;
import org.dromara.common.excel.annotation.ExcelDictFormat;
import org.dromara.common.excel.convert.ExcelDictConvert;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;



/**
 * 用户自己记录视图对象 tp_user_record
 *
 * @author Maosw
 * @date 2025-04-14
 */
@Data
@ExcelIgnoreUnannotated
@AutoMapper(target = TpUserRecord.class)
public class TpUserRecordVo implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 记录ID
     */
    @ExcelProperty(value = "记录ID")
    private Long id;

    /**
     * 用户ID
     */
    @ExcelProperty(value = "用户ID")
    private Long userId;

    /**
     * 用户姓名
     */
    @ExcelProperty(value = "用户姓名")
    private String userName;

    /**
     * 用户手机号码
     */
    @ExcelProperty(value = "用户手机号码")
    private String userPhone;

    /**
     * 变动金额（正数增加，负数减少）
     */
    @ExcelProperty(value = "变动金额", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "正=数增加，负数减少")
    private BigDecimal amount;

    /**
     * 变动后余额
     */
    @ExcelProperty(value = "变动后余额")
    private BigDecimal balance;

    /**
     * 变动类型: 1-增加, 2-扣除, 3-提现, 4-其他
     */
    @ExcelProperty(value = "变动类型: 1-增加, 2-扣除, 3-提现, 4-其他")
    private Integer type;

    /**
     * 订单ID
     */
    @ExcelProperty(value = "订单ID")
    private Long orderId;

    /**
     * 订单编号
     */
    @ExcelProperty(value = "订单编号")
    private String orderNum;

    /**
     * 创建时间
     */
    @ExcelProperty(value = "创建时间")
    private Date createTime;

    /**
     * 备注
     */
    @ExcelProperty(value = "备注")
    private String remark;


}
