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-18
 */
@TableName("navigation")
@Data
@EqualsAndHashCode(callSuper=true)
public class Navigation extends Model<Navigation> {

    private static final long serialVersionUID = 1L;

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

    @ApiModelProperty("导航栏名称")
    private String name;

    @ApiModelProperty("父id（0为顶级）")
    private Integer parentId;

    @ApiModelProperty("创建时间")
    @JSONField(format="yyyy-MM-dd HH:mm:ss")
    private Date createTime;

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

    @ApiModelProperty("语言类型(1：中文 2：英文)")
    private Integer language;

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

}
