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

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.baomidou.mybatisplus.annotation.*;
import java.io.Serializable;

import com.dk.common.infrastructure.annotaiton.ExportTitle;
import com.dk.common.infrastructure.handler.TimestampTypeHandler;
import com.dk.common.infrastructure.handler.UuidTypeHandler;
import com.dk.common.model.pojo.PageInfo;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.time.LocalDateTime;

/**
 *  角色权限
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@ExportTitle("角色权限")
@TableName(value = "t_role_right", autoResultMap = true,schema="core")
@ApiModel(value="实体类：角色权限", description="表名：t_role_right")
public class RoleRight extends PageInfo<RoleRight> implements Serializable {

    /*
     * 数据库字段
     */

    /**
     * 角色ID
     */
    @TableId(value = "role_id", type = IdType.AUTO)
    @ApiModelProperty(value = "角色ID")
    private Integer roleId;


    /**
     * 功能ID
     */
    @Excel(name = "功能ID")
    @ApiModelProperty(value = "功能ID")
    @TableField(typeHandler = UuidTypeHandler.class)
    private String funUuid;


    /**
     * 应用代码
     */
    @Excel(name = "应用代码")
    @ApiModelProperty(value = "应用代码")
    private String appCode;


    /**
     * 工厂ID
     */
    @Excel(name = "工厂ID")
    @ApiModelProperty(value = "工厂ID")
    private Integer ftyId;


    /**
     * 创建时间 (触发器自动处理)
     */
    @Excel(name = "创建时间 (触发器自动处理)", format = "yyyy-MM-dd HH:mm:ss", width = 20)
    @ApiModelProperty(value = "创建时间 (触发器自动处理)")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(typeHandler = TimestampTypeHandler.class)
    private LocalDateTime opCreateTime;


    /**
     * 创建用户 (触发器自动处理)
     */
    @Excel(name = "创建用户 (触发器自动处理)")
    @ApiModelProperty(value = "创建用户 (触发器自动处理)")
    private Long opCreateUserId;


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

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


    private static final long serialVersionUID = 1L;

}
