Remove redundant field power_id

This commit is contained in:
2023-11-15 14:03:01 +08:00
parent c0c033ad77
commit d334a231df
23 changed files with 52 additions and 117 deletions

View File

@@ -7,7 +7,6 @@ object ElementConverter {
fun elementToElementVo(element: Element) = ElementVo(
id = element.id,
name = element.name,
powerId = element.powerId,
parentId = element.parentId,
menuId = element.menuId
)

View File

@@ -8,7 +8,6 @@ object MenuConverter {
id = menu.id,
name = menu.name,
url = menu.url,
powerId = menu.powerId,
parentId = menu.parentId,
moduleId = menu.moduleId
)

View File

@@ -6,7 +6,6 @@ import top.fatweb.api.vo.permission.ModuleVo
object ModuleConverter {
fun moduleToModuleVo(module: Module) = ModuleVo(
id = module.id,
name = module.name,
powerId = module.powerId
name = module.name
)
}

View File

@@ -8,7 +8,6 @@ object OperationConverter {
id = operation.id,
name = operation.name,
code = operation.code,
powerId = operation.powerId,
elementId = operation.elementId
)
}

View File

@@ -25,12 +25,6 @@ class Element : Serializable {
@TableField("name")
var name: String? = null
/**
* 权限ID
*/
@TableField("power_id")
var powerId: Long? = null
/**
* 父ID
*/
@@ -44,6 +38,6 @@ class Element : Serializable {
var menuId: Long? = null
override fun toString(): String {
return "Element(id=$id, name=$name, powerId=$powerId, menuId=$menuId)"
return "Element(id=$id, name=$name, parentId=$parentId, menuId=$menuId)"
}
}

View File

@@ -31,12 +31,6 @@ class Menu : Serializable {
@TableField("url")
var url: String? = null
/**
* 权限ID
*/
@TableField("power_id")
var powerId: Long? = null
/**
* 父ID
*/
@@ -50,6 +44,6 @@ class Menu : Serializable {
var moduleId: Long? = null
override fun toString(): String {
return "Menu(id=$id, name=$name, url=$url, powerId=$powerId, parentId=$parentId, moduleId=$moduleId)"
return "Menu(id=$id, name=$name, url=$url, parentId=$parentId, moduleId=$moduleId)"
}
}

View File

@@ -25,14 +25,7 @@ class Module : Serializable {
@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)"
return "Module(id=$id, name=$name)"
}
}

View File

@@ -31,12 +31,6 @@ class Operation : Serializable {
@TableField("code")
var code: String? = null
/**
* 权限ID
*/
@TableField("power_id")
var powerId: Long? = null
/**
* 页面元素ID
*/
@@ -44,6 +38,6 @@ class Operation : Serializable {
var elementId: Long? = null
override fun toString(): String {
return "Operation(id=$id, name=$name, code=$code, powerId=$powerId, elementId=$elementId)"
return "Operation(id=$id, name=$name, code=$code, elementId=$elementId)"
}
}

View File

@@ -9,9 +9,6 @@ data class ElementVo(
@Schema(description = "元素名", example = "AddButton")
val name: String?,
@Schema(description = "权限 ID")
val powerId: Long?,
@Schema(description = "父 ID")
val parentId: Long?,

View File

@@ -12,9 +12,6 @@ data class MenuVo(
@Schema(description = "URL", example = "/system")
val url: String?,
@Schema(description = "权限 ID")
val powerId: Long?,
@Schema(description = "父 ID")
val parentId: Long?,

View File

@@ -7,8 +7,5 @@ data class ModuleVo(
val id: Long?,
@Schema(description = "模块名", example = "系统")
val name: String?,
@Schema(description = "权限 ID")
val powerId: Long?
val name: String?
)

View File

@@ -12,9 +12,6 @@ data class OperationVo(
@Schema(description = "功能编码", example = "system:user:add")
val code: String?,
@Schema(description = "权限 ID")
val powerId: Long?,
@Schema(description = "页面元素 ID")
val elementId: Long?
)