package com.webchat.repository.entity;

import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @author 程序员七七， https://www.coderutil.com网站作者
 * @date 2024/11/8 23:05
 */
@Data
@Entity
@Table(name = "web_chat_user_wallet")
public class UserWalletEntity {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    protected Long id;

    /**
     * 事件类型
     */
    @Column(name = "trans_event")
    private Integer transEvent;

    /**
     * 收入 / 支出
     */
    @Column(name = "trans_type")
    private Integer transType;

    /**
     * 当前用户
     */
    @Column(name = "user_id")
    private String userId;

    /**
     * 目前用户
     */
    @Column(name = "target_user_id")
    private String targetUserId;

    /**
     * 总金额
     */
    @Column(name = "money")
    private BigDecimal money;

    /**
     * 流转时间
     */
    @Column(name = "trans_date")
    private Date transDate;
}
