package com.leromro.core.domain;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.leromro.common.core.domain.BaseEntity;

/**
 * 用户钱包余额变更记录对象 l_client_account_change
 * 
 * @author ruoyi
 * @date 2025-05-07
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName("l_client_account_change")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "LClientAccountChange", description = "用户钱包余额变更记录")
public class ClientAccountChange extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    @TableId(type = IdType.AUTO)
    private Long clientAccountChangeId;

    @TableField("user_id")
    @ApiModelProperty("用户id")
    private Long userId;

    @TableField("change_type")
    @ApiModelProperty("变更类型 1增加 0减少 ")
    private String changeType;

    @TableField("source_type")
    @ApiModelProperty("变更类型，1 订单支出 2订单退款 9钱包充值 10 钱包提现")
    private String sourceType;

    @TableField("change_money")
    @ApiModelProperty("变更金额")
    private BigDecimal changeMoney;

    @TableField("before_balance")
    @ApiModelProperty("变更前钱包余额")
    private BigDecimal beforeBalance;

    @TableField("after_balance")
    @ApiModelProperty("变更后钱包余额")
    private BigDecimal afterBalance;

    @TableField("main_order_id")
    @ApiModelProperty("相关主订单id")
    private Long mainOrderId;
}
