package com.heketai.website.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 资讯标签
 * </p>
 *
 * @author xjl
 * @since 2019-11-19
 */
@TableName("news_tag")
@Data
@EqualsAndHashCode(callSuper=true)
public class NewsTag extends Model<NewsTag> {

    private static final long serialVersionUID = 1L;

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

    @ApiModelProperty("新闻id")
    private Integer newsId;

    @ApiModelProperty("分类名称")
    private String name;

    @ApiModelProperty("链接路径")
    private String url;

    @ApiModelProperty("修改时间")
    @JSONField(format="yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

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

}
