package com.hssx.pcbms.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;

import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author 吴涛涛
 * @since 2019-11-02
 */
public class IdeaComment extends Model<IdeaComment> {

    private static final long serialVersionUID=1L;

    /**
     * 建议回复表主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 建议表外键
     */
    @TableField("idea_id")
    private Integer ideaId;

    /**
     * 对于建议的回复
     */
    @TableField("content")
    private String content;

    /**
     * 回复人的id
     */
    @TableField("responder_id")
    private Integer responderId;

    /**
     * 回复人的名字
     */
    @TableField("responder")
    private String responder;

    /**
     * 回复时间
     */
    @TableField("indate")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime indate;


    public Integer getId() {
        return id;
    }

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

    public Integer getIdeaId() {
        return ideaId;
    }

    public void setIdeaId(Integer ideaId) {
        this.ideaId = ideaId;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Integer getResponderId() {
        return responderId;
    }

    public void setResponderId(Integer responderId) {
        this.responderId = responderId;
    }

    public String getResponder() {
        return responder;
    }

    public void setResponder(String responder) {
        this.responder = responder;
    }

    public LocalDateTime getIndate() {
        return indate;
    }

    public void setIndate(LocalDateTime indate) {
        this.indate = indate;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "IdeaComment{" +
        "id=" + id +
        ", ideaId=" + ideaId +
        ", content=" + content +
        ", responderId=" + responderId +
        ", responder=" + responder +
        ", indate=" + indate +
        "}";
    }
}
