package com.example.kafka.entity;

import lombok.*;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

/**
 * User entity class model for user details
 */
@ToString
@EqualsAndHashCode(of = {"id","name"})
@AllArgsConstructor
@NoArgsConstructor
@Data
@Document(value = "users")
public class User {

    /**
     * User id
     */
    @Id
    private String id;

    /**
     * User name
     */
    private String name;

    /**
     * User's age
     */
    private int age;

    /**
     * User's balance
     */
    private double balance;

    private String departmentName;
}
