package com.ruoyi.system.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.GeneratedValue;
import com.ruoyi.common.core.domain.BaseEntity;

import java.util.Date;

/**
 * 积分流水对象 points_transaction
 *
 * @author ruoyi
 * @date 2025-05-30
 */
@Data
@TableName(value = "points_transaction")
@EqualsAndHashCode(callSuper = false)
public class PointsTransaction
{
    private static final long serialVersionUID = 1L;

    @TableId(type = IdType.AUTO)
    @GeneratedValue
    /** $column.columnComment */
    private Long id;

    /** 用户id */
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private Long userId;

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

    /** 门店id */
    private Long mdId;
    /** 积分类型  0 获得  1 抵扣  2 退回*/

    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private String type;

    /** 积分变动值（正为增加，负为减少） */
    @Excel(name = "积分变动值", readConverterExp = "正=为增加，负为减少")
    private String pointsChange;

    /** 变动后积分余额 */
    @Excel(name = "变动后积分余额")
    private String currentPoints;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date  createTime;
    private Date updateTime;



}
