package com.czg.market.entity;

import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

import java.io.Serial;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 会员经验值流水表 实体类。
 *
 * @author zs
 * @since 2025-09-12
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table("tb_member_exp_flow")
public class MemberExpFlow implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @Id(keyType = KeyType.Auto)
    private Long id;

    /**
     * 描述
     */
    private String content;

    /**
     * 类型 + -
     */
    private String type;

    /**
     * 来源类型 COST消费赠送 RECHARGE充值
     */
    private String sourceType;

    /**
     * 赠送数量
     */
    private Long value;

    /**
     * 来源id
     */
    private Long sourceId;

    private Long userId;

    private Long shopId;

    /**
     * 创建时间
     */
    @Column(onInsertValue = "now()")
    private LocalDateTime createTime;
    private BigDecimal money;

}
