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

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

import java.io.Serializable;
import java.util.UUID;

/**
 * <p>
 * 系统中心-敏感词
 * </p>
 *
 * @author wulixian
 * @since 2021-03-29
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "SysSensitiveWords对象", description = "系统中心-敏感词")
@TableName("sys_sensitive_words")
public class SysSensitiveWords implements Serializable {

    private static final long serialVersionUID = 1L;

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

    @ApiModelProperty(value = "配置编号")
    private String sensitiveWordsId;

    @ApiModelProperty(value = "关键词")
    private String sensitiveWords;

    @ApiModelProperty(value = "备注说明")
    private String comm;

    @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;

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