package com.fzm.mall.server.admin.system.model;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;

import com.fzm.mall.server.admin.util.UUIDUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 系统中心-常见问题
 * </p>
 *
 * @author fzm
 * @since 2021-03-29
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="SysQuestion对象", description="系统中心-常见问题")
@TableName("sys_question")
public class SysQuestion implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "问题编号")
    private String questionId;

    @ApiModelProperty(value = "导航编号")
    private String navigationId;

    @ApiModelProperty(value = "问题")
    private String question;

    @ApiModelProperty(value = "答案")
    private String answer;

    @ApiModelProperty(value = "显示顺序")
    private Long displayOrder;

    @ApiModelProperty(value = "是否删除(0--否 1--是 )")
    private Boolean status;

    @ApiModelProperty(value = "信息入库时间")
    @TableField(fill = FieldFill.INSERT)
    private Long createTime;

    @ApiModelProperty(value = "信息修改时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Long updateTime;

    @ApiModelProperty(value = "导航名称")
    @TableField(exist = false)
    private String navigationName;

    public void init() {
        setQuestionId(UUIDUtil.getUUID());
        setStatus(false);
    }
}
