package cn.com.ty.lift.system.faq.dao.entity;

import cn.com.ty.lift.common.model.BaseTree;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * <p>
 * 常见问题级常见问题分类表
 * </p>
 *
 * @author wang-hai-cheng
 * @since 2019-11-21
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class Faq extends BaseTree implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * (分类 问题标题 答案) 的id
     */
    @TableId(value = "id", type = IdType.ID_WORKER)
    @NotNull(message = "id不能为空")
    private Long id;

    /**
     * 内容
     */
    @TableField("content")
    private String content;

    /**
     * 1分类 2问题标题 3答案
     */
    @TableField("type")
    private Integer type;

    /**
     * 父id
     */
    @TableField("parent_id")
    private Long parentId;

    /**
     * 序号
     */
    @TableField("serial")
    private Integer serial;

    /**
     * 描述
     */
    @TableField("description")
    private String description;
}