Reconstruct the permission system

This commit is contained in:
2023-10-30 16:28:32 +08:00
parent 97af1331e2
commit 69680dd4ad
48 changed files with 191 additions and 112 deletions

View File

@@ -7,7 +7,7 @@ import java.io.Serializable
/**
* <p>
* 页面元素
* 页面元素
* </p>
*
* @author FatttSnake

View File

@@ -5,7 +5,7 @@ import java.io.Serializable
/**
* <p>
* 用户组
* 用户组
* </p>
*
* @author FatttSnake

View File

@@ -7,7 +7,7 @@ import java.io.Serializable
/**
* <p>
* 菜单
* 菜单
* </p>
*
* @author FatttSnake
@@ -43,7 +43,13 @@ class Menu : Serializable {
@TableField("parent_id")
var parentId: Long? = null
/**
* 模块ID
*/
@TableField("module_id")
var moduleId: Long? = null
override fun toString(): String {
return "Menu(id=$id, name=$name, url=$url, powerId=$powerId, parentId=$parentId)"
return "Menu(id=$id, name=$name, url=$url, powerId=$powerId, parentId=$parentId, moduleId=$moduleId)"
}
}

View File

@@ -0,0 +1,38 @@
package top.fatweb.api.entity.permission
import com.baomidou.mybatisplus.annotation.TableField
import com.baomidou.mybatisplus.annotation.TableId
import com.baomidou.mybatisplus.annotation.TableName
import java.io.Serializable
/**
* <p>
* 模块表
* </p>
*
* @author FatttSnake
* @since 2023-10-25
*/
@TableName("t_module")
class Module : Serializable {
@TableId("id")
var id: Long? = null
/**
* 模块名
*/
@TableField("name")
var name: String? = null
/**
* 权限ID
*/
@TableField("power_id")
var powerId: Long? = null
override fun toString(): String {
return "Module(id=$id, name=$name, powerId=$powerId)"
}
}

View File

@@ -7,7 +7,7 @@ import java.io.Serializable
/**
* <p>
* 功能
* 功能
* </p>
*
* @author FatttSnake
@@ -37,12 +37,6 @@ class Operation : Serializable {
@TableField("power_id")
var powerId: Long? = null
/**
* 父ID
*/
@TableField("parent_id")
var parentId: Long? = null
/**
* 页面元素ID
*/
@@ -50,6 +44,6 @@ class Operation : Serializable {
var elementId: Long? = null
override fun toString(): String {
return "Operation(id=$id, name=$name, code=$code, powerId=$powerId, parentId=$parentId, elementId=$elementId)"
return "Operation(id=$id, name=$name, code=$code, powerId=$powerId, elementId=$elementId)"
}
}

View File

@@ -7,7 +7,7 @@ import java.io.Serializable
/**
* <p>
* 权限
* 权限
* </p>
*
* @author FatttSnake
@@ -23,7 +23,7 @@ class Power : Serializable {
* 权限类型
*/
@TableField("type_id")
var typeId: Long? = null
var typeId: Int? = null
override fun toString(): String {
return "Power(id=$id, typeId=$typeId)"

View File

@@ -7,7 +7,7 @@ import java.io.Serializable
/**
* <p>
* 权限类型
* 权限类型
* </p>
*
* @author FatttSnake

View File

@@ -5,7 +5,7 @@ import java.io.Serializable
/**
* <p>
* 角色
* 角色
* </p>
*
* @author FatttSnake