package com.dk.mdm.model.pojo.sys;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.dk.common.infrastructure.annotaiton.ExportTitle;
import com.dk.common.infrastructure.handler.JsonTypeHandler;
import com.dk.common.model.pojo.PageInfo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;

@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@ExportTitle
@TableName(value = "t_s_module", autoResultMap = true)
@ApiModel(value="实体类：", description="表名：t_s_module")
public class Module extends PageInfo<Module> implements Serializable {

    /*
     * 数据库字段
     */

    /**
     * 模块代码
     */
    @TableId(value = "module_code", type = IdType.AUTO)
    @ApiModelProperty(value = "模块代码")
    private String moduleCode;


    /**
     * 模块名称(国际化)
     */
    @Excel(name = "模块名称(国际化)")
    @ApiModelProperty(value = "模块名称(国际化)")
    @TableField(typeHandler = JsonTypeHandler.class)
    private JSONObject moduleNameI18n;


    /**
     * 父级代码 (顶层为#)
     */
    @Excel(name = "父级代码 (顶层为#)")
    @ApiModelProperty(value = "父级代码 (顶层为#)")
    private String parentCode;


    /**
     * 显示顺序
     */
    @Excel(name = "显示顺序")
    @ApiModelProperty(value = "显示顺序")
    private Integer displayNo;


    /**
     * 层级序号 (第几层，从1开始，父层级+1)
     */
    @Excel(name = "层级序号 (第几层，从1开始，父层级+1)")
    @ApiModelProperty(value = "层级序号 (第几层，从1开始，父层级+1)")
    private Integer levelNo;


    /**
     * 层级代码 (上层level_code+display_no+#)
     */
    @Excel(name = "层级代码 (上层level_code+display_no+#)")
    @ApiModelProperty(value = "层级代码 (上层level_code+display_no+#)")
    private String levelCode;


    /**
     * 系统ID
     */
    @Excel(name = "系统ID")
    @ApiModelProperty(value = "系统ID")
    private Integer sysId;


    /**
     * 有效标识 (1：正常 0：停用)
     */
    @Excel(name = "有效标识 (1：正常 0：停用)")
    @ApiModelProperty(value = "有效标识 (1：正常 0：停用)")
    private Boolean flgValid;


    /**
     * 备注
     */
    @Excel(name = "备注")
    @ApiModelProperty(value = "备注")
    private String remarks;


    /*
     * 相关属性
     * @TableField(exist = false)
     */

    /*
     * 关联属性 + 查询条件
     * @TableField(exist = false)
     */

    @Excel(name = "模块名（国际化）")
    @ApiModelProperty(value = "模块名（国际化）")
    @TableField(exist = false)
    private String moduleName;



    @Excel(name = "页面代码")
    @ApiModelProperty(value = "页面代码")
    @TableField(exist = false)
    private String pageNames;

    @Excel(name = "页面代码")
    @ApiModelProperty(value = "页面代码")
    @TableField(exist = false)
    private String pageCode;

    @Excel(name = "页面代码")
    @ApiModelProperty(value = "页面代码")
    @TableField(exist = false)
    private String pageName;

    @Excel(name = "文档代码")
    @ApiModelProperty(value = "文档代码")
    @TableField(exist = false)
    private String docName;

    @Excel(name = "文档代码")
    @ApiModelProperty(value = "文档代码")
    @TableField(exist = false)
    private String docCode;

    @Excel(name = "页面代码")
    @ApiModelProperty(value = "页面代码")
    @TableField(exist = false)
    private String pageCodes;

    @Excel(name = "项目类型")
    @ApiModelProperty(value = "项目类型")
    @TableField(exist = false)
    private Long flgNum;



    private static final long serialVersionUID = 1L;

}
