package com.elab.example.springbootdemo.es.entity;

import org.zxp.esclientrhl.annotation.ESID;
import org.zxp.esclientrhl.annotation.ESMapping;
import org.zxp.esclientrhl.annotation.ESMetaData;

import java.io.Serializable;
import java.util.Date;

/**
 * 用户entity
 *
 * @author ： liukx
 * @time ： 2019/8/1 - 11:40
 */
@ESMetaData(indexName = "posts", indexType = "doc", number_of_shards = 5, number_of_replicas = 0,printLog = true)
public class User implements Serializable {

    @ESID
    private String id;
    @ESMapping(suggest = true)
    private String user;
    private String message;
    private Date postDate;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getUser() {
        return user;
    }

    public void setUser(String user) {
        this.user = user;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Date getPostDate() {
        return postDate;
    }

    public void setPostDate(Date postDate) {
        this.postDate = postDate;
    }

    @Override
    public String toString() {
        return "User{" +
                ", id='" + id + '\'' +
                ", user='" + user + '\'' +
                ", message='" + message + '\'' +
                ", postDate=" + postDate +
                '}';
    }
}
