package com.qxgmat.data.dao.entity;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.*;

@Table(name = "manager_log")
public class ManagerLog implements Serializable {
    @Id
    @Column(name = "`id`")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;

    /**
     * 管理员ID
     */
    @Column(name = "`manager_id`")
    private Integer managerId;

    /**
     * 用户名
     */
    @Column(name = "`username`")
    private String username;

    /**
     * 当前ip
     */
    @Column(name = "`ip`")
    private String ip;

    @Column(name = "`create_time`")
    private Date createTime;

    /**
     * 内容：json
     */
    @Column(name = "`content`")
    private String content;

    private static final long serialVersionUID = 1L;

    /**
     * @return id
     */
    public Integer getId() {
        return id;
    }

    /**
     * @param id
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * 获取管理员ID
     *
     * @return manager_id - 管理员ID
     */
    public Integer getManagerId() {
        return managerId;
    }

    /**
     * 设置管理员ID
     *
     * @param managerId 管理员ID
     */
    public void setManagerId(Integer managerId) {
        this.managerId = managerId;
    }

    /**
     * 获取用户名
     *
     * @return username - 用户名
     */
    public String getUsername() {
        return username;
    }

    /**
     * 设置用户名
     *
     * @param username 用户名
     */
    public void setUsername(String username) {
        this.username = username;
    }

    /**
     * 获取当前ip
     *
     * @return ip - 当前ip
     */
    public String getIp() {
        return ip;
    }

    /**
     * 设置当前ip
     *
     * @param ip 当前ip
     */
    public void setIp(String ip) {
        this.ip = ip;
    }

    /**
     * @return create_time
     */
    public Date getCreateTime() {
        return createTime;
    }

    /**
     * @param createTime
     */
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    /**
     * 获取内容：json
     *
     * @return content - 内容：json
     */
    public String getContent() {
        return content;
    }

    /**
     * 设置内容：json
     *
     * @param content 内容：json
     */
    public void setContent(String content) {
        this.content = content;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", managerId=").append(managerId);
        sb.append(", username=").append(username);
        sb.append(", ip=").append(ip);
        sb.append(", createTime=").append(createTime);
        sb.append(", content=").append(content);
        sb.append("]");
        return sb.toString();
    }

    public static ManagerLog.Builder builder() {
        return new ManagerLog.Builder();
    }

    public static class Builder {
        private ManagerLog obj;

        public Builder() {
            this.obj = new ManagerLog();
        }

        /**
         * @param id
         */
        public Builder id(Integer id) {
            obj.setId(id);
            return this;
        }

        /**
         * 设置管理员ID
         *
         * @param managerId 管理员ID
         */
        public Builder managerId(Integer managerId) {
            obj.setManagerId(managerId);
            return this;
        }

        /**
         * 设置用户名
         *
         * @param username 用户名
         */
        public Builder username(String username) {
            obj.setUsername(username);
            return this;
        }

        /**
         * 设置当前ip
         *
         * @param ip 当前ip
         */
        public Builder ip(String ip) {
            obj.setIp(ip);
            return this;
        }

        /**
         * @param createTime
         */
        public Builder createTime(Date createTime) {
            obj.setCreateTime(createTime);
            return this;
        }

        /**
         * 设置内容：json
         *
         * @param content 内容：json
         */
        public Builder content(String content) {
            obj.setContent(content);
            return this;
        }

        public ManagerLog build() {
            return this.obj;
        }
    }
}