Add kdoc and permission
This commit is contained in:
@@ -2,6 +2,7 @@ package top.fatweb.oxygen.api.controller.tool
|
|||||||
|
|
||||||
import io.swagger.v3.oas.annotations.Operation
|
import io.swagger.v3.oas.annotations.Operation
|
||||||
import jakarta.validation.Valid
|
import jakarta.validation.Valid
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize
|
||||||
import org.springframework.web.bind.annotation.*
|
import org.springframework.web.bind.annotation.*
|
||||||
import top.fatweb.oxygen.api.annotation.BaseController
|
import top.fatweb.oxygen.api.annotation.BaseController
|
||||||
import top.fatweb.oxygen.api.entity.common.ResponseCode
|
import top.fatweb.oxygen.api.entity.common.ResponseCode
|
||||||
@@ -11,38 +12,100 @@ import top.fatweb.oxygen.api.param.tool.ToolBaseUpdateParam
|
|||||||
import top.fatweb.oxygen.api.service.tool.IToolBaseService
|
import top.fatweb.oxygen.api.service.tool.IToolBaseService
|
||||||
import top.fatweb.oxygen.api.vo.tool.ToolBaseVo
|
import top.fatweb.oxygen.api.vo.tool.ToolBaseVo
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tool base management controller
|
||||||
|
*
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
* @see IToolBaseService
|
||||||
|
*/
|
||||||
@BaseController(path = ["/system/tool/base"], name = "工具基板管理", description = "工具基板管理相关接口")
|
@BaseController(path = ["/system/tool/base"], name = "工具基板管理", description = "工具基板管理相关接口")
|
||||||
class BaseController(
|
class BaseController(
|
||||||
private val toolBaseService: IToolBaseService
|
private val toolBaseService: IToolBaseService
|
||||||
) {
|
) {
|
||||||
|
/**
|
||||||
|
* Get tool base by ID
|
||||||
|
*
|
||||||
|
* @param id Tool base ID
|
||||||
|
* @return Response object includes tool base information
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
* @see ResponseResult
|
||||||
|
* @see ToolBaseVo
|
||||||
|
*/
|
||||||
@Operation(summary = "获取单个基板")
|
@Operation(summary = "获取单个基板")
|
||||||
@GetMapping("/{id}")
|
@GetMapping("/{id}")
|
||||||
|
@PreAuthorize("hasAnyAuthority('system:tool:query:base')")
|
||||||
fun getOne(@PathVariable id: Long): ResponseResult<ToolBaseVo> =
|
fun getOne(@PathVariable id: Long): ResponseResult<ToolBaseVo> =
|
||||||
ResponseResult.databaseSuccess(data = toolBaseService.getOne(id))
|
ResponseResult.databaseSuccess(data = toolBaseService.getOne(id))
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get tool base list
|
||||||
|
*
|
||||||
|
* @return Response object includes tool base list
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
* @see ResponseResult
|
||||||
|
* @see ToolBaseVo
|
||||||
|
*/
|
||||||
@Operation(summary = "获取基板")
|
@Operation(summary = "获取基板")
|
||||||
@GetMapping
|
@GetMapping
|
||||||
|
@PreAuthorize("hasAnyAuthority('system:tool:query:base', 'system:tool:add:template', 'system:tool:modify:template')")
|
||||||
fun get(): ResponseResult<List<ToolBaseVo>> =
|
fun get(): ResponseResult<List<ToolBaseVo>> =
|
||||||
ResponseResult.databaseSuccess(data = toolBaseService.get())
|
ResponseResult.databaseSuccess(data = toolBaseService.get())
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add tool base
|
||||||
|
*
|
||||||
|
* @param toolBaseAddParam Add tool base parameters
|
||||||
|
* @return Response object includes tool base information
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
* @see ToolBaseAddParam
|
||||||
|
* @see ResponseResult
|
||||||
|
* @see ToolBaseVo
|
||||||
|
*/
|
||||||
@Operation(summary = "新增基板")
|
@Operation(summary = "新增基板")
|
||||||
@PostMapping
|
@PostMapping
|
||||||
|
@PreAuthorize("hasAnyAuthority('system:tool:add:base')")
|
||||||
fun add(@RequestBody @Valid toolBaseAddParam: ToolBaseAddParam): ResponseResult<ToolBaseVo> =
|
fun add(@RequestBody @Valid toolBaseAddParam: ToolBaseAddParam): ResponseResult<ToolBaseVo> =
|
||||||
ResponseResult.databaseSuccess(
|
ResponseResult.databaseSuccess(
|
||||||
ResponseCode.DATABASE_INSERT_SUCCESS,
|
ResponseCode.DATABASE_INSERT_SUCCESS,
|
||||||
data = toolBaseService.add(toolBaseAddParam)
|
data = toolBaseService.add(toolBaseAddParam)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update tool base
|
||||||
|
*
|
||||||
|
* @param toolBaseUpdateParam Update tool base parameters
|
||||||
|
* @return Response object includes tool base information
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
* @see ToolBaseUpdateParam
|
||||||
|
* @see ResponseResult
|
||||||
|
* @see ToolBaseVo
|
||||||
|
*/
|
||||||
@Operation(summary = "更新基板")
|
@Operation(summary = "更新基板")
|
||||||
@PutMapping
|
@PutMapping
|
||||||
|
@PreAuthorize("hasAnyAuthority('system:tool:modify:base')")
|
||||||
fun update(@RequestBody @Valid toolBaseUpdateParam: ToolBaseUpdateParam): ResponseResult<ToolBaseVo> =
|
fun update(@RequestBody @Valid toolBaseUpdateParam: ToolBaseUpdateParam): ResponseResult<ToolBaseVo> =
|
||||||
ResponseResult.databaseSuccess(
|
ResponseResult.databaseSuccess(
|
||||||
ResponseCode.DATABASE_UPDATE_SUCCESS,
|
ResponseCode.DATABASE_UPDATE_SUCCESS,
|
||||||
data = toolBaseService.update(toolBaseUpdateParam)
|
data = toolBaseService.update(toolBaseUpdateParam)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Delete tool base by ID
|
||||||
|
*
|
||||||
|
* @param id Tool base ID
|
||||||
|
* @return Response object
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
* @see ResponseResult
|
||||||
|
*/
|
||||||
@Operation(summary = "删除基板")
|
@Operation(summary = "删除基板")
|
||||||
@DeleteMapping("/{id}")
|
@DeleteMapping("/{id}")
|
||||||
|
@PreAuthorize("hasAnyAuthority('system:tool:delete:base')")
|
||||||
fun delete(@PathVariable id: Long): ResponseResult<Nothing> =
|
fun delete(@PathVariable id: Long): ResponseResult<Nothing> =
|
||||||
if (toolBaseService.delete(id)) ResponseResult.databaseSuccess(ResponseCode.DATABASE_DELETE_SUCCESS)
|
if (toolBaseService.delete(id)) ResponseResult.databaseSuccess(ResponseCode.DATABASE_DELETE_SUCCESS)
|
||||||
else ResponseResult.databaseFail(ResponseCode.DATABASE_DELETE_FAILED)
|
else ResponseResult.databaseFail(ResponseCode.DATABASE_DELETE_FAILED)
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package top.fatweb.oxygen.api.controller.tool
|
|||||||
|
|
||||||
import io.swagger.v3.oas.annotations.Operation
|
import io.swagger.v3.oas.annotations.Operation
|
||||||
import jakarta.validation.Valid
|
import jakarta.validation.Valid
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize
|
||||||
import org.springframework.web.bind.annotation.*
|
import org.springframework.web.bind.annotation.*
|
||||||
import top.fatweb.oxygen.api.annotation.BaseController
|
import top.fatweb.oxygen.api.annotation.BaseController
|
||||||
import top.fatweb.oxygen.api.entity.common.ResponseCode
|
import top.fatweb.oxygen.api.entity.common.ResponseCode
|
||||||
@@ -11,7 +12,6 @@ import top.fatweb.oxygen.api.param.tool.ToolCategoryUpdateParam
|
|||||||
import top.fatweb.oxygen.api.service.tool.IToolCategoryService
|
import top.fatweb.oxygen.api.service.tool.IToolCategoryService
|
||||||
import top.fatweb.oxygen.api.vo.tool.ToolCategoryVo
|
import top.fatweb.oxygen.api.vo.tool.ToolCategoryVo
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tool category management controller
|
* Tool category management controller
|
||||||
*
|
*
|
||||||
@@ -22,34 +22,89 @@ import top.fatweb.oxygen.api.vo.tool.ToolCategoryVo
|
|||||||
class CategoryController(
|
class CategoryController(
|
||||||
private val toolCategoryService: IToolCategoryService
|
private val toolCategoryService: IToolCategoryService
|
||||||
) {
|
) {
|
||||||
|
/**
|
||||||
|
* Get tool category by ID
|
||||||
|
*
|
||||||
|
* @param id Tool category ID
|
||||||
|
* @return Response object includes tool template information
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
* @see ResponseResult
|
||||||
|
* @see ToolCategoryVo
|
||||||
|
*/
|
||||||
@Operation(summary = "获取单个类别")
|
@Operation(summary = "获取单个类别")
|
||||||
@GetMapping("/{id}")
|
@GetMapping("/{id}")
|
||||||
|
@PreAuthorize("hasAnyAuthority('system:tool:query:category')")
|
||||||
fun getOne(@PathVariable id: Long): ResponseResult<ToolCategoryVo> =
|
fun getOne(@PathVariable id: Long): ResponseResult<ToolCategoryVo> =
|
||||||
ResponseResult.databaseSuccess(data = toolCategoryService.getOne(id))
|
ResponseResult.databaseSuccess(data = toolCategoryService.getOne(id))
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get tool category list
|
||||||
|
*
|
||||||
|
* @return Response object includes tool template list
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
* @see ResponseResult
|
||||||
|
* @see ToolCategoryVo
|
||||||
|
*/
|
||||||
@Operation(summary = "获取类别")
|
@Operation(summary = "获取类别")
|
||||||
@GetMapping
|
@GetMapping
|
||||||
|
@PreAuthorize("hasAnyAuthority('system:tool:query:category')")
|
||||||
fun get(): ResponseResult<List<ToolCategoryVo>> =
|
fun get(): ResponseResult<List<ToolCategoryVo>> =
|
||||||
ResponseResult.databaseSuccess(data = toolCategoryService.get())
|
ResponseResult.databaseSuccess(data = toolCategoryService.get())
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add tool category
|
||||||
|
*
|
||||||
|
* @param toolCategoryAddParam Add tool category parameters
|
||||||
|
* @return Response object includes tool category information
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
* @see ToolCategoryAddParam
|
||||||
|
* @see ResponseResult
|
||||||
|
* @see ToolCategoryVo
|
||||||
|
*/
|
||||||
@Operation(summary = "新增类别")
|
@Operation(summary = "新增类别")
|
||||||
@PostMapping
|
@PostMapping
|
||||||
|
@PreAuthorize("hasAnyAuthority('system:tool:add:category')")
|
||||||
fun add(@RequestBody @Valid toolCategoryAddParam: ToolCategoryAddParam): ResponseResult<ToolCategoryVo> =
|
fun add(@RequestBody @Valid toolCategoryAddParam: ToolCategoryAddParam): ResponseResult<ToolCategoryVo> =
|
||||||
ResponseResult.databaseSuccess(
|
ResponseResult.databaseSuccess(
|
||||||
ResponseCode.DATABASE_INSERT_SUCCESS,
|
ResponseCode.DATABASE_INSERT_SUCCESS,
|
||||||
data = toolCategoryService.add(toolCategoryAddParam)
|
data = toolCategoryService.add(toolCategoryAddParam)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update tool category
|
||||||
|
*
|
||||||
|
* @param toolCategoryUpdateParam Update tool category parameters
|
||||||
|
* @return Response object includes tool category information
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
* @see ToolCategoryUpdateParam
|
||||||
|
* @see ResponseResult
|
||||||
|
* @see ToolCategoryVo
|
||||||
|
*/
|
||||||
@Operation(summary = "更新类别")
|
@Operation(summary = "更新类别")
|
||||||
@PutMapping
|
@PutMapping
|
||||||
|
@PreAuthorize("hasAnyAuthority('system:tool:modify:category')")
|
||||||
fun update(@RequestBody @Valid toolCategoryUpdateParam: ToolCategoryUpdateParam): ResponseResult<ToolCategoryVo> =
|
fun update(@RequestBody @Valid toolCategoryUpdateParam: ToolCategoryUpdateParam): ResponseResult<ToolCategoryVo> =
|
||||||
ResponseResult.databaseSuccess(
|
ResponseResult.databaseSuccess(
|
||||||
ResponseCode.DATABASE_UPDATE_SUCCESS,
|
ResponseCode.DATABASE_UPDATE_SUCCESS,
|
||||||
data = toolCategoryService.update(toolCategoryUpdateParam)
|
data = toolCategoryService.update(toolCategoryUpdateParam)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Delete tool category
|
||||||
|
*
|
||||||
|
* @param id Tool category ID
|
||||||
|
* @return Response object
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
* @see ResponseResult
|
||||||
|
*/
|
||||||
@Operation(summary = "删除类别")
|
@Operation(summary = "删除类别")
|
||||||
@DeleteMapping("/{id}")
|
@DeleteMapping("/{id}")
|
||||||
|
@PreAuthorize("hasAnyAuthority('system:tool:delete:category')")
|
||||||
fun delete(@PathVariable id: Long): ResponseResult<Nothing> =
|
fun delete(@PathVariable id: Long): ResponseResult<Nothing> =
|
||||||
if (toolCategoryService.delete(id)) ResponseResult.databaseSuccess(ResponseCode.DATABASE_DELETE_SUCCESS)
|
if (toolCategoryService.delete(id)) ResponseResult.databaseSuccess(ResponseCode.DATABASE_DELETE_SUCCESS)
|
||||||
else ResponseResult.databaseFail(ResponseCode.DATABASE_DELETE_FAILED)
|
else ResponseResult.databaseFail(ResponseCode.DATABASE_DELETE_FAILED)
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package top.fatweb.oxygen.api.controller.tool
|
|||||||
|
|
||||||
import io.swagger.v3.oas.annotations.Operation
|
import io.swagger.v3.oas.annotations.Operation
|
||||||
import jakarta.validation.Valid
|
import jakarta.validation.Valid
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize
|
||||||
import org.springframework.web.bind.annotation.*
|
import org.springframework.web.bind.annotation.*
|
||||||
import top.fatweb.oxygen.api.annotation.BaseController
|
import top.fatweb.oxygen.api.annotation.BaseController
|
||||||
import top.fatweb.oxygen.api.entity.common.ResponseCode
|
import top.fatweb.oxygen.api.entity.common.ResponseCode
|
||||||
@@ -11,38 +12,100 @@ import top.fatweb.oxygen.api.param.tool.ToolTemplateUpdateParam
|
|||||||
import top.fatweb.oxygen.api.service.tool.IToolTemplateService
|
import top.fatweb.oxygen.api.service.tool.IToolTemplateService
|
||||||
import top.fatweb.oxygen.api.vo.tool.ToolTemplateVo
|
import top.fatweb.oxygen.api.vo.tool.ToolTemplateVo
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tool template management controller
|
||||||
|
*
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
* @see IToolTemplateService
|
||||||
|
*/
|
||||||
@BaseController(path = ["/system/tool/template"], name = "工具模板管理", description = "工具模板管理相关接口")
|
@BaseController(path = ["/system/tool/template"], name = "工具模板管理", description = "工具模板管理相关接口")
|
||||||
class TemplateController(
|
class TemplateController(
|
||||||
private val toolTemplateService: IToolTemplateService
|
private val toolTemplateService: IToolTemplateService
|
||||||
) {
|
) {
|
||||||
|
/**
|
||||||
|
* Get tool template by ID
|
||||||
|
*
|
||||||
|
* @param id Tool template ID
|
||||||
|
* @return Response object includes tool template information
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
* @see ResponseResult
|
||||||
|
* @see ToolTemplateVo
|
||||||
|
*/
|
||||||
@Operation(summary = "获取单个模板")
|
@Operation(summary = "获取单个模板")
|
||||||
@GetMapping("/{id}")
|
@GetMapping("/{id}")
|
||||||
|
@PreAuthorize("hasAnyAuthority('system:tool:query:template')")
|
||||||
fun getOne(@PathVariable id: Long): ResponseResult<ToolTemplateVo> =
|
fun getOne(@PathVariable id: Long): ResponseResult<ToolTemplateVo> =
|
||||||
ResponseResult.databaseSuccess(data = toolTemplateService.getOne(id))
|
ResponseResult.databaseSuccess(data = toolTemplateService.getOne(id))
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get tool template list
|
||||||
|
*
|
||||||
|
* @return Response object includes tool template list
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
* @see ResponseResult
|
||||||
|
* @see ToolTemplateVo
|
||||||
|
*/
|
||||||
@Operation(summary = "获取模板")
|
@Operation(summary = "获取模板")
|
||||||
@GetMapping
|
@GetMapping
|
||||||
|
@PreAuthorize("hasAnyAuthority('system:tool:query:template')")
|
||||||
fun get(): ResponseResult<List<ToolTemplateVo>> =
|
fun get(): ResponseResult<List<ToolTemplateVo>> =
|
||||||
ResponseResult.databaseSuccess(data = toolTemplateService.get())
|
ResponseResult.databaseSuccess(data = toolTemplateService.get())
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add tool template
|
||||||
|
*
|
||||||
|
* @param toolTemplateAddParam Add tool template parameters
|
||||||
|
* @return Response object includes tool template information
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
* @see ToolTemplateAddParam
|
||||||
|
* @see ResponseResult
|
||||||
|
* @see ToolTemplateVo
|
||||||
|
*/
|
||||||
@Operation(summary = "添加模板")
|
@Operation(summary = "添加模板")
|
||||||
@PostMapping
|
@PostMapping
|
||||||
|
@PreAuthorize("hasAnyAuthority('system:tool:add:template')")
|
||||||
fun add(@RequestBody @Valid toolTemplateAddParam: ToolTemplateAddParam): ResponseResult<ToolTemplateVo> =
|
fun add(@RequestBody @Valid toolTemplateAddParam: ToolTemplateAddParam): ResponseResult<ToolTemplateVo> =
|
||||||
ResponseResult.databaseSuccess(
|
ResponseResult.databaseSuccess(
|
||||||
ResponseCode.DATABASE_INSERT_SUCCESS,
|
ResponseCode.DATABASE_INSERT_SUCCESS,
|
||||||
data = toolTemplateService.add(toolTemplateAddParam)
|
data = toolTemplateService.add(toolTemplateAddParam)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update tool template
|
||||||
|
*
|
||||||
|
* @param toolTemplateUpdateParam Update tool template parameters
|
||||||
|
* @return Response object includes tool template information
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
* @see ToolTemplateUpdateParam
|
||||||
|
* @see ResponseResult
|
||||||
|
* @see ToolTemplateVo
|
||||||
|
*/
|
||||||
@Operation(summary = "更新模板")
|
@Operation(summary = "更新模板")
|
||||||
@PutMapping
|
@PutMapping
|
||||||
|
@PreAuthorize("hasAnyAuthority('system:tool:modify:template')")
|
||||||
fun update(@RequestBody @Valid toolTemplateUpdateParam: ToolTemplateUpdateParam): ResponseResult<ToolTemplateVo> =
|
fun update(@RequestBody @Valid toolTemplateUpdateParam: ToolTemplateUpdateParam): ResponseResult<ToolTemplateVo> =
|
||||||
ResponseResult.databaseSuccess(
|
ResponseResult.databaseSuccess(
|
||||||
ResponseCode.DATABASE_UPDATE_SUCCESS,
|
ResponseCode.DATABASE_UPDATE_SUCCESS,
|
||||||
data = toolTemplateService.update(toolTemplateUpdateParam)
|
data = toolTemplateService.update(toolTemplateUpdateParam)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Delete tool template
|
||||||
|
*
|
||||||
|
* @param id Tool template ID
|
||||||
|
* @return Response object
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
* @see ResponseResult
|
||||||
|
*/
|
||||||
@Operation(summary = "删除模板")
|
@Operation(summary = "删除模板")
|
||||||
@DeleteMapping("/{id}")
|
@DeleteMapping("/{id}")
|
||||||
|
@PreAuthorize("hasAnyAuthority('system:tool:delete:template')")
|
||||||
fun delete(@PathVariable id: Long): ResponseResult<Nothing> =
|
fun delete(@PathVariable id: Long): ResponseResult<Nothing> =
|
||||||
if (toolTemplateService.delete(id)) ResponseResult.databaseSuccess(ResponseCode.DATABASE_DELETE_SUCCESS)
|
if (toolTemplateService.delete(id)) ResponseResult.databaseSuccess(ResponseCode.DATABASE_DELETE_SUCCESS)
|
||||||
else ResponseResult.databaseFail(ResponseCode.DATABASE_DELETE_FAILED)
|
else ResponseResult.databaseFail(ResponseCode.DATABASE_DELETE_FAILED)
|
||||||
|
|||||||
@@ -4,7 +4,23 @@ import top.fatweb.oxygen.api.entity.tool.ToolBase
|
|||||||
import top.fatweb.oxygen.api.vo.tool.ToolBaseVo
|
import top.fatweb.oxygen.api.vo.tool.ToolBaseVo
|
||||||
import top.fatweb.oxygen.api.vo.tool.ToolDataVo
|
import top.fatweb.oxygen.api.vo.tool.ToolDataVo
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tool base converter
|
||||||
|
*
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
object ToolBaseConverter {
|
object ToolBaseConverter {
|
||||||
|
/**
|
||||||
|
* Convert ToolBase object into ToolBaseVo object
|
||||||
|
*
|
||||||
|
* @param toolBase ToolBase object
|
||||||
|
* @return ToolBaseVo object
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
* @see ToolBase
|
||||||
|
* @see ToolBaseVo
|
||||||
|
*/
|
||||||
fun toolBaseToToolBaseVo(toolBase: ToolBase) = ToolBaseVo(
|
fun toolBaseToToolBaseVo(toolBase: ToolBase) = ToolBaseVo(
|
||||||
id = toolBase.id,
|
id = toolBase.id,
|
||||||
name = toolBase.name,
|
name = toolBase.name,
|
||||||
@@ -16,6 +32,16 @@ object ToolBaseConverter {
|
|||||||
enable = toolBase.enable == 1
|
enable = toolBase.enable == 1
|
||||||
)
|
)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert ToolBase object into ToolBaseVo object by get list
|
||||||
|
*
|
||||||
|
* @param toolBase ToolBase object
|
||||||
|
* @return ToolBaseVo object
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
* @see ToolBase
|
||||||
|
* @see ToolBaseVo
|
||||||
|
*/
|
||||||
fun toolBaseToToolBaseVoByGetList(toolBase: ToolBase) = ToolBaseVo(
|
fun toolBaseToToolBaseVoByGetList(toolBase: ToolBase) = ToolBaseVo(
|
||||||
id = toolBase.id,
|
id = toolBase.id,
|
||||||
name = toolBase.name,
|
name = toolBase.name,
|
||||||
|
|||||||
@@ -5,7 +5,23 @@ import top.fatweb.oxygen.api.param.tool.ToolCategoryAddParam
|
|||||||
import top.fatweb.oxygen.api.param.tool.ToolCategoryUpdateParam
|
import top.fatweb.oxygen.api.param.tool.ToolCategoryUpdateParam
|
||||||
import top.fatweb.oxygen.api.vo.tool.ToolCategoryVo
|
import top.fatweb.oxygen.api.vo.tool.ToolCategoryVo
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tool category converter
|
||||||
|
*
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
object ToolCategoryConverter {
|
object ToolCategoryConverter {
|
||||||
|
/**
|
||||||
|
* Convert ToolCategory object into ToolCategoryVo object
|
||||||
|
*
|
||||||
|
* @param toolCategory ToolCategory object
|
||||||
|
* @return ToolCategoryVo object
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
* @see ToolCategory
|
||||||
|
* @see ToolCategoryVo
|
||||||
|
*/
|
||||||
fun toolCategoryToToolCategoryVo(toolCategory: ToolCategory) = ToolCategoryVo(
|
fun toolCategoryToToolCategoryVo(toolCategory: ToolCategory) = ToolCategoryVo(
|
||||||
id = toolCategory.id,
|
id = toolCategory.id,
|
||||||
name = toolCategory.name,
|
name = toolCategory.name,
|
||||||
@@ -14,11 +30,31 @@ object ToolCategoryConverter {
|
|||||||
updateTime = toolCategory.updateTime
|
updateTime = toolCategory.updateTime
|
||||||
)
|
)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert ToolCategoryAddParam object into ToolCategory object
|
||||||
|
*
|
||||||
|
* @param toolCategoryAddParam ToolCategoryAddParam object
|
||||||
|
* @return ToolCateGory object
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
* @see ToolCategoryAddParam
|
||||||
|
* @see ToolCategory
|
||||||
|
*/
|
||||||
fun toolCategoryAddParamToToolCategory(toolCategoryAddParam: ToolCategoryAddParam) = ToolCategory().apply {
|
fun toolCategoryAddParamToToolCategory(toolCategoryAddParam: ToolCategoryAddParam) = ToolCategory().apply {
|
||||||
name = toolCategoryAddParam.name
|
name = toolCategoryAddParam.name
|
||||||
enable = if (toolCategoryAddParam.enable) 1 else 0
|
enable = if (toolCategoryAddParam.enable) 1 else 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert ToolCategoryUpdateParam object into ToolCategory object
|
||||||
|
*
|
||||||
|
* @param toolCategoryUpdateParam ToolCategoryUpdateParam object
|
||||||
|
* @return ToolCategory object
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
* @see ToolCategoryUpdateParam
|
||||||
|
* @see ToolCategory
|
||||||
|
*/
|
||||||
fun toolCategoryUpdateParamToToolCategory(toolCategoryUpdateParam: ToolCategoryUpdateParam) = ToolCategory().apply {
|
fun toolCategoryUpdateParamToToolCategory(toolCategoryUpdateParam: ToolCategoryUpdateParam) = ToolCategory().apply {
|
||||||
id = toolCategoryUpdateParam.id
|
id = toolCategoryUpdateParam.id
|
||||||
name = toolCategoryUpdateParam.name
|
name = toolCategoryUpdateParam.name
|
||||||
|
|||||||
@@ -4,7 +4,23 @@ import top.fatweb.oxygen.api.converter.permission.UserInfoConverter
|
|||||||
import top.fatweb.oxygen.api.entity.tool.Tool
|
import top.fatweb.oxygen.api.entity.tool.Tool
|
||||||
import top.fatweb.oxygen.api.vo.tool.ToolVo
|
import top.fatweb.oxygen.api.vo.tool.ToolVo
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tool converter
|
||||||
|
*
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
object ToolConverter {
|
object ToolConverter {
|
||||||
|
/**
|
||||||
|
* Convert Tool object into ToolVo object
|
||||||
|
*
|
||||||
|
* @param tool Tool object
|
||||||
|
* @return ToolVo object
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
* @see Tool
|
||||||
|
* @see ToolVo
|
||||||
|
*/
|
||||||
fun toolToToolVo(tool: Tool) = ToolVo(
|
fun toolToToolVo(tool: Tool) = ToolVo(
|
||||||
id = tool.id,
|
id = tool.id,
|
||||||
name = tool.name,
|
name = tool.name,
|
||||||
|
|||||||
@@ -3,7 +3,23 @@ package top.fatweb.oxygen.api.converter.tool
|
|||||||
import top.fatweb.oxygen.api.entity.tool.ToolData
|
import top.fatweb.oxygen.api.entity.tool.ToolData
|
||||||
import top.fatweb.oxygen.api.vo.tool.ToolDataVo
|
import top.fatweb.oxygen.api.vo.tool.ToolDataVo
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tool data converter
|
||||||
|
*
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
object ToolDataConverter {
|
object ToolDataConverter {
|
||||||
|
/**
|
||||||
|
* Convert ToolData object into ToolDataVo object
|
||||||
|
*
|
||||||
|
* @param toolData ToolData object
|
||||||
|
* @return ToolDataVo object
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
* @see ToolData
|
||||||
|
* @see ToolDataVo
|
||||||
|
*/
|
||||||
fun toolDataToToolDataVo(toolData: ToolData) = ToolDataVo(
|
fun toolDataToToolDataVo(toolData: ToolData) = ToolDataVo(
|
||||||
id = toolData.id,
|
id = toolData.id,
|
||||||
data = toolData.data,
|
data = toolData.data,
|
||||||
|
|||||||
@@ -3,7 +3,23 @@ package top.fatweb.oxygen.api.converter.tool
|
|||||||
import top.fatweb.oxygen.api.entity.tool.ToolTemplate
|
import top.fatweb.oxygen.api.entity.tool.ToolTemplate
|
||||||
import top.fatweb.oxygen.api.vo.tool.ToolTemplateVo
|
import top.fatweb.oxygen.api.vo.tool.ToolTemplateVo
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tool template converter
|
||||||
|
*
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
object ToolTemplateConverter {
|
object ToolTemplateConverter {
|
||||||
|
/**
|
||||||
|
* Convert ToolTemplate object into ToolTemplateVo object
|
||||||
|
*
|
||||||
|
* @param toolTemplate ToolTemplate object
|
||||||
|
* @return ToolTemplateVo object
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
* @see ToolTemplate
|
||||||
|
* @see ToolTemplateVo
|
||||||
|
*/
|
||||||
fun toolTemplateToToolTemplateVo(toolTemplate: ToolTemplate) = ToolTemplateVo(
|
fun toolTemplateToToolTemplateVo(toolTemplate: ToolTemplate) = ToolTemplateVo(
|
||||||
id = toolTemplate.id,
|
id = toolTemplate.id,
|
||||||
name = toolTemplate.name,
|
name = toolTemplate.name,
|
||||||
|
|||||||
@@ -1,14 +1,31 @@
|
|||||||
package top.fatweb.oxygen.api.param.tool
|
package top.fatweb.oxygen.api.param.tool
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema
|
||||||
import jakarta.validation.constraints.NotBlank
|
import jakarta.validation.constraints.NotBlank
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add tool base parameters
|
||||||
|
*
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
data class ToolBaseAddParam(
|
data class ToolBaseAddParam(
|
||||||
|
/**
|
||||||
|
* Name
|
||||||
|
*
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
@Schema(description = "名称", required = true)
|
||||||
@field: NotBlank(message = "Name can not be blank")
|
@field: NotBlank(message = "Name can not be blank")
|
||||||
val name: String?,
|
val name: String?,
|
||||||
|
|
||||||
val source: String = "",
|
/**
|
||||||
|
* Enable
|
||||||
val dist: String = "",
|
*
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
@Schema(description = "启用", allowableValues = ["true", "false"], defaultValue = "true")
|
||||||
val enable: Boolean = true
|
val enable: Boolean = true
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,16 +1,58 @@
|
|||||||
package top.fatweb.oxygen.api.param.tool
|
package top.fatweb.oxygen.api.param.tool
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema
|
||||||
import jakarta.validation.constraints.NotNull
|
import jakarta.validation.constraints.NotNull
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update tool base parameters
|
||||||
|
*
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
data class ToolBaseUpdateParam(
|
data class ToolBaseUpdateParam(
|
||||||
|
/**
|
||||||
|
* ID
|
||||||
|
*
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
@Schema(description = "ID", required = true)
|
||||||
@field: NotNull(message = "ID can not be null")
|
@field: NotNull(message = "ID can not be null")
|
||||||
val id: Long?,
|
val id: Long?,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Name
|
||||||
|
*
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
@Schema(description = "名称")
|
||||||
val name: String?,
|
val name: String?,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Source
|
||||||
|
*
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
@Schema(description = "源码")
|
||||||
val source: String?,
|
val source: String?,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Dist
|
||||||
|
*
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
@Schema(description = "产物")
|
||||||
val dist: String?,
|
val dist: String?,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Enable
|
||||||
|
*
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
@Schema(description = "启用", allowableValues = ["true", "false"])
|
||||||
val enable: Boolean?
|
val enable: Boolean?
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,10 +1,31 @@
|
|||||||
package top.fatweb.oxygen.api.param.tool
|
package top.fatweb.oxygen.api.param.tool
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema
|
||||||
import jakarta.validation.constraints.NotBlank
|
import jakarta.validation.constraints.NotBlank
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add tool category parameters
|
||||||
|
*
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
data class ToolCategoryAddParam(
|
data class ToolCategoryAddParam(
|
||||||
|
/**
|
||||||
|
* Name
|
||||||
|
*
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
@Schema(description = "名称", required = true)
|
||||||
@field: NotBlank(message = "Name can not be blank")
|
@field: NotBlank(message = "Name can not be blank")
|
||||||
val name: String?,
|
val name: String?,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Enable
|
||||||
|
*
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
@Schema(description = "启用", allowableValues = ["true", "false"], defaultValue = "true")
|
||||||
val enable: Boolean = true
|
val enable: Boolean = true
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,14 +1,40 @@
|
|||||||
package top.fatweb.oxygen.api.param.tool
|
package top.fatweb.oxygen.api.param.tool
|
||||||
|
|
||||||
import jakarta.validation.constraints.NotBlank
|
import io.swagger.v3.oas.annotations.media.Schema
|
||||||
import jakarta.validation.constraints.NotNull
|
import jakarta.validation.constraints.NotNull
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update tool category parameters
|
||||||
|
*
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
data class ToolCategoryUpdateParam(
|
data class ToolCategoryUpdateParam(
|
||||||
|
/**
|
||||||
|
* ID
|
||||||
|
*
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
@Schema(description = "ID", required = true)
|
||||||
@field: NotNull(message = "ID can not be null")
|
@field: NotNull(message = "ID can not be null")
|
||||||
val id: Long?,
|
val id: Long?,
|
||||||
|
|
||||||
@field: NotBlank(message = "Name can not be blank")
|
/**
|
||||||
|
* Name
|
||||||
|
*
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
@Schema(description = "名称")
|
||||||
val name: String?,
|
val name: String?,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Enable
|
||||||
|
*
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
@Schema(description = "启用", allowableValues = ["true", "false"])
|
||||||
val enable: Boolean?
|
val enable: Boolean?
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,16 +1,42 @@
|
|||||||
package top.fatweb.oxygen.api.param.tool
|
package top.fatweb.oxygen.api.param.tool
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema
|
||||||
import jakarta.validation.constraints.NotBlank
|
import jakarta.validation.constraints.NotBlank
|
||||||
import jakarta.validation.constraints.NotNull
|
import jakarta.validation.constraints.NotNull
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add tool template parameters
|
||||||
|
*
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
data class ToolTemplateAddParam(
|
data class ToolTemplateAddParam(
|
||||||
|
/**
|
||||||
|
* Name
|
||||||
|
*
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
@Schema(description = "名称", required = true)
|
||||||
@field: NotBlank(message = "Name can not be blank")
|
@field: NotBlank(message = "Name can not be blank")
|
||||||
val name: String?,
|
val name: String?,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Base ID
|
||||||
|
*
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
@Schema(description = "Base ID", required = true)
|
||||||
@field: NotNull(message = "BaseId can not be null")
|
@field: NotNull(message = "BaseId can not be null")
|
||||||
val baseId: Long? = null,
|
val baseId: Long? = null,
|
||||||
|
|
||||||
val source: String = "",
|
/**
|
||||||
|
* Enable
|
||||||
|
*
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
@Schema(description = "启用", allowableValues = ["true", "false"], defaultValue = "true")
|
||||||
val enable: Boolean = true
|
val enable: Boolean = true
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,16 +1,58 @@
|
|||||||
package top.fatweb.oxygen.api.param.tool
|
package top.fatweb.oxygen.api.param.tool
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema
|
||||||
import jakarta.validation.constraints.NotNull
|
import jakarta.validation.constraints.NotNull
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update tool template parameters
|
||||||
|
*
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
data class ToolTemplateUpdateParam(
|
data class ToolTemplateUpdateParam(
|
||||||
|
/**
|
||||||
|
* ID
|
||||||
|
*
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
@Schema(description = "ID", required = true)
|
||||||
@field: NotNull(message = "ID can not be null")
|
@field: NotNull(message = "ID can not be null")
|
||||||
val id: Long?,
|
val id: Long?,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Name
|
||||||
|
*
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
@Schema(description = "名称")
|
||||||
val name: String?,
|
val name: String?,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Base ID
|
||||||
|
*
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
@Schema(description = "Base ID")
|
||||||
val baseId: Long?,
|
val baseId: Long?,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Source
|
||||||
|
*
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
@Schema(description = "源码")
|
||||||
val source: String?,
|
val source: String?,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Enable
|
||||||
|
*
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
@Schema(description = "启用", allowableValues = ["true", "false"])
|
||||||
val enable: Boolean?
|
val enable: Boolean?
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -15,13 +15,58 @@ import top.fatweb.oxygen.api.vo.tool.ToolBaseVo
|
|||||||
* @see ToolBase
|
* @see ToolBase
|
||||||
*/
|
*/
|
||||||
interface IToolBaseService : IService<ToolBase> {
|
interface IToolBaseService : IService<ToolBase> {
|
||||||
|
/**
|
||||||
|
* Get tool base by ID
|
||||||
|
*
|
||||||
|
* @param id ID
|
||||||
|
* @return ToolBaseVo object
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
* @see ToolBaseVo
|
||||||
|
*/
|
||||||
fun getOne(id: Long): ToolBaseVo
|
fun getOne(id: Long): ToolBaseVo
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get tool base in list
|
||||||
|
*
|
||||||
|
* @return List of ToolBaseVo object
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
* @see ToolBaseVo
|
||||||
|
*/
|
||||||
fun get(): List<ToolBaseVo>
|
fun get(): List<ToolBaseVo>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add tool base
|
||||||
|
*
|
||||||
|
* @param toolBaseAddParam Add tool base parameters
|
||||||
|
* @return ToolBaseVo object
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
* @see ToolBaseAddParam
|
||||||
|
* @see ToolBaseVo
|
||||||
|
*/
|
||||||
fun add(toolBaseAddParam: ToolBaseAddParam): ToolBaseVo
|
fun add(toolBaseAddParam: ToolBaseAddParam): ToolBaseVo
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update tool base
|
||||||
|
*
|
||||||
|
* @param toolBaseUpdateParam Update tool base parameters
|
||||||
|
* @return ToolBaseVo object
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
* @see ToolBaseUpdateParam
|
||||||
|
* @see ToolBaseVo
|
||||||
|
*/
|
||||||
fun update(toolBaseUpdateParam: ToolBaseUpdateParam): ToolBaseVo
|
fun update(toolBaseUpdateParam: ToolBaseUpdateParam): ToolBaseVo
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Delete tool base
|
||||||
|
*
|
||||||
|
* @param id ID
|
||||||
|
* @return Result
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
fun delete(id: Long): Boolean
|
fun delete(id: Long): Boolean
|
||||||
}
|
}
|
||||||
@@ -15,13 +15,58 @@ import top.fatweb.oxygen.api.vo.tool.ToolCategoryVo
|
|||||||
* @see ToolCategory
|
* @see ToolCategory
|
||||||
*/
|
*/
|
||||||
interface IToolCategoryService : IService<ToolCategory> {
|
interface IToolCategoryService : IService<ToolCategory> {
|
||||||
|
/**
|
||||||
|
* Get tool category by ID
|
||||||
|
*
|
||||||
|
* @param id ID
|
||||||
|
* @return ToolCategoryVo object
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
* @see ToolCategoryVo
|
||||||
|
*/
|
||||||
fun getOne(id: Long): ToolCategoryVo
|
fun getOne(id: Long): ToolCategoryVo
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get tool category in list
|
||||||
|
*
|
||||||
|
* @return List of ToolCategoryVo object
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
* @see ToolCategoryVo
|
||||||
|
*/
|
||||||
fun get(): List<ToolCategoryVo>
|
fun get(): List<ToolCategoryVo>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add tool category
|
||||||
|
*
|
||||||
|
* @param toolCategoryAddParam Add tool category parameters
|
||||||
|
* @return ToolCategoryVo object
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
* @see ToolCategoryAddParam
|
||||||
|
* @see ToolCategoryVo
|
||||||
|
*/
|
||||||
fun add(toolCategoryAddParam: ToolCategoryAddParam): ToolCategoryVo
|
fun add(toolCategoryAddParam: ToolCategoryAddParam): ToolCategoryVo
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update tool category
|
||||||
|
*
|
||||||
|
* @param toolCategoryUpdateParam Update tool category parameters
|
||||||
|
* @return ToolCategoryVo object
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
* @see ToolCategoryUpdateParam
|
||||||
|
* @see ToolCategoryVo
|
||||||
|
*/
|
||||||
fun update(toolCategoryUpdateParam: ToolCategoryUpdateParam): ToolCategoryVo
|
fun update(toolCategoryUpdateParam: ToolCategoryUpdateParam): ToolCategoryVo
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Delete tool category
|
||||||
|
*
|
||||||
|
* @param id ID
|
||||||
|
* @return Result
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
fun delete(id: Long): Boolean
|
fun delete(id: Long): Boolean
|
||||||
}
|
}
|
||||||
@@ -15,13 +15,58 @@ import top.fatweb.oxygen.api.vo.tool.ToolTemplateVo
|
|||||||
* @see ToolTemplate
|
* @see ToolTemplate
|
||||||
*/
|
*/
|
||||||
interface IToolTemplateService : IService<ToolTemplate> {
|
interface IToolTemplateService : IService<ToolTemplate> {
|
||||||
|
/**
|
||||||
|
* Get tool template by ID
|
||||||
|
*
|
||||||
|
* @param id ID
|
||||||
|
* @return ToolTemplateVo object
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
* @see ToolTemplateVo
|
||||||
|
*/
|
||||||
fun getOne(id: Long): ToolTemplateVo
|
fun getOne(id: Long): ToolTemplateVo
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get tool template in list
|
||||||
|
*
|
||||||
|
* @return List of ToolTemplateVo object
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
* @see ToolTemplateVo
|
||||||
|
*/
|
||||||
fun get(): List<ToolTemplateVo>
|
fun get(): List<ToolTemplateVo>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add tool template
|
||||||
|
*
|
||||||
|
* @param toolTemplateAddParam Add tool template parameters
|
||||||
|
* @return ToolTemplateVo object
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
* @see ToolTemplateAddParam
|
||||||
|
* @see ToolTemplateVo
|
||||||
|
*/
|
||||||
fun add(toolTemplateAddParam: ToolTemplateAddParam): ToolTemplateVo
|
fun add(toolTemplateAddParam: ToolTemplateAddParam): ToolTemplateVo
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update tool template
|
||||||
|
*
|
||||||
|
* @param toolTemplateUpdateParam Update tool template parameters
|
||||||
|
* @return ToolTemplateVo object
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
* @see ToolTemplateUpdateParam
|
||||||
|
* @see ToolTemplateVo
|
||||||
|
*/
|
||||||
fun update(toolTemplateUpdateParam: ToolTemplateUpdateParam): ToolTemplateVo
|
fun update(toolTemplateUpdateParam: ToolTemplateUpdateParam): ToolTemplateVo
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Delete tool template
|
||||||
|
*
|
||||||
|
* @param id ID
|
||||||
|
* @return Result
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
fun delete(id: Long): Boolean
|
fun delete(id: Long): Boolean
|
||||||
}
|
}
|
||||||
@@ -35,8 +35,8 @@ class ToolBaseServiceImpl(
|
|||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
override fun add(toolBaseAddParam: ToolBaseAddParam): ToolBaseVo {
|
override fun add(toolBaseAddParam: ToolBaseAddParam): ToolBaseVo {
|
||||||
val newSource = ToolData().apply { data = toolBaseAddParam.source }
|
val newSource = ToolData().apply { data = "" }
|
||||||
val newDist = ToolData().apply { data = toolBaseAddParam.dist }
|
val newDist = ToolData().apply { data = "" }
|
||||||
|
|
||||||
toolDataService.save(newSource)
|
toolDataService.save(newSource)
|
||||||
toolDataService.save(newDist)
|
toolDataService.save(newDist)
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ class ToolTemplateServiceImpl(
|
|||||||
override fun add(toolTemplateAddParam: ToolTemplateAddParam): ToolTemplateVo {
|
override fun add(toolTemplateAddParam: ToolTemplateAddParam): ToolTemplateVo {
|
||||||
toolBaseService.getOne(toolTemplateAddParam.baseId!!)
|
toolBaseService.getOne(toolTemplateAddParam.baseId!!)
|
||||||
|
|
||||||
val newSource = ToolData().apply { data = toolTemplateAddParam.source }
|
val newSource = ToolData().apply { data = "" }
|
||||||
|
|
||||||
toolDataService.save(newSource)
|
toolDataService.save(newSource)
|
||||||
|
|
||||||
|
|||||||
@@ -2,23 +2,88 @@ package top.fatweb.oxygen.api.vo.tool
|
|||||||
|
|
||||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize
|
||||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema
|
||||||
import java.time.LocalDateTime
|
import java.time.LocalDateTime
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tool base value object
|
||||||
|
*
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
@Schema(description = "工具基板返回参数")
|
||||||
data class ToolBaseVo(
|
data class ToolBaseVo(
|
||||||
|
/**
|
||||||
|
* ID
|
||||||
|
*
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
@JsonSerialize(using = ToStringSerializer::class)
|
@JsonSerialize(using = ToStringSerializer::class)
|
||||||
val id: Long?,
|
val id: Long?,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Name
|
||||||
|
*
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
@Schema(description = "名称")
|
||||||
val name: String?,
|
val name: String?,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Source
|
||||||
|
*
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
@Schema(description = "源码")
|
||||||
val source: ToolDataVo?,
|
val source: ToolDataVo?,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Dist
|
||||||
|
*
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
@Schema(description = "产物")
|
||||||
val dist: ToolDataVo?,
|
val dist: ToolDataVo?,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Compiled
|
||||||
|
*
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
@Schema(description = "已编译")
|
||||||
val compiled: Boolean?,
|
val compiled: Boolean?,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Enable
|
||||||
|
*
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
@Schema(description = "启用")
|
||||||
val enable: Boolean?,
|
val enable: Boolean?,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create time
|
||||||
|
*
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
* @see LocalDateTime
|
||||||
|
*/
|
||||||
|
@Schema(description = "创建时间", example = "1900-01-01T00:00:00.000Z")
|
||||||
val createTime: LocalDateTime?,
|
val createTime: LocalDateTime?,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update time
|
||||||
|
*
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
* @see LocalDateTime
|
||||||
|
*/
|
||||||
|
@Schema(description = "修改时间", example = "1900-01-01T00:00:00.000Z")
|
||||||
val updateTime: LocalDateTime?
|
val updateTime: LocalDateTime?
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -2,17 +2,61 @@ package top.fatweb.oxygen.api.vo.tool
|
|||||||
|
|
||||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize
|
||||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema
|
||||||
import java.time.LocalDateTime
|
import java.time.LocalDateTime
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tool base value object
|
||||||
|
*
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
@Schema(description = "工具类别返回参数")
|
||||||
data class ToolCategoryVo(
|
data class ToolCategoryVo(
|
||||||
|
/**
|
||||||
|
* ID
|
||||||
|
*
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
@JsonSerialize(using = ToStringSerializer::class)
|
@JsonSerialize(using = ToStringSerializer::class)
|
||||||
val id: Long?,
|
val id: Long?,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Name
|
||||||
|
*
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
@Schema(description = "名称")
|
||||||
val name: String?,
|
val name: String?,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Enable
|
||||||
|
*
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
@Schema(description = "启用")
|
||||||
val enable: Boolean?,
|
val enable: Boolean?,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create time
|
||||||
|
*
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
* @see LocalDateTime
|
||||||
|
*/
|
||||||
|
@Schema(description = "创建时间", example = "1900-01-01T00:00:00.000Z")
|
||||||
val createTime: LocalDateTime?,
|
val createTime: LocalDateTime?,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update time
|
||||||
|
*
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
* @see LocalDateTime
|
||||||
|
*/
|
||||||
|
@Schema(description = "修改时间", example = "1900-01-01T00:00:00.000Z")
|
||||||
val updateTime: LocalDateTime?
|
val updateTime: LocalDateTime?
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -2,15 +2,52 @@ package top.fatweb.oxygen.api.vo.tool
|
|||||||
|
|
||||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize
|
||||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema
|
||||||
import java.time.LocalDateTime
|
import java.time.LocalDateTime
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tool data value object
|
||||||
|
*
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
@Schema(description = "工具数据返回参数")
|
||||||
data class ToolDataVo(
|
data class ToolDataVo(
|
||||||
|
/**
|
||||||
|
* ID
|
||||||
|
*
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
@JsonSerialize(using = ToStringSerializer::class)
|
@JsonSerialize(using = ToStringSerializer::class)
|
||||||
val id: Long?,
|
val id: Long?,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Data
|
||||||
|
*
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
@Schema(description = "数据")
|
||||||
val data: String?,
|
val data: String?,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create time
|
||||||
|
*
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
* @see LocalDateTime
|
||||||
|
*/
|
||||||
|
@Schema(description = "创建时间", example = "1900-01-01T00:00:00.000Z")
|
||||||
val createTime: LocalDateTime?,
|
val createTime: LocalDateTime?,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update time
|
||||||
|
*
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
* @see LocalDateTime
|
||||||
|
*/
|
||||||
|
@Schema(description = "修改时间", example = "1900-01-01T00:00:00.000Z")
|
||||||
val updateTime: LocalDateTime?
|
val updateTime: LocalDateTime?
|
||||||
)
|
)
|
||||||
@@ -2,21 +2,79 @@ package top.fatweb.oxygen.api.vo.tool
|
|||||||
|
|
||||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize
|
||||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema
|
||||||
import java.time.LocalDateTime
|
import java.time.LocalDateTime
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tool template value object
|
||||||
|
*
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
@Schema(description = "工具模板返回参数")
|
||||||
data class ToolTemplateVo(
|
data class ToolTemplateVo(
|
||||||
|
/**
|
||||||
|
* ID
|
||||||
|
*
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
@JsonSerialize(using = ToStringSerializer::class)
|
@JsonSerialize(using = ToStringSerializer::class)
|
||||||
val id: Long?,
|
val id: Long?,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Name
|
||||||
|
*
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
@Schema(description = "名称")
|
||||||
val name: String?,
|
val name: String?,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Base
|
||||||
|
*
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
@Schema(description = "基板")
|
||||||
val base: ToolBaseVo?,
|
val base: ToolBaseVo?,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Source
|
||||||
|
*
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
@Schema(description = "源码")
|
||||||
val source: ToolDataVo?,
|
val source: ToolDataVo?,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Enable
|
||||||
|
*
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
@Schema(description = "启用")
|
||||||
val enable: Boolean?,
|
val enable: Boolean?,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create time
|
||||||
|
*
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
* @see LocalDateTime
|
||||||
|
*/
|
||||||
|
@Schema(description = "创建时间", example = "1900-01-01T00:00:00.000Z")
|
||||||
val createTime: LocalDateTime?,
|
val createTime: LocalDateTime?,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update time
|
||||||
|
*
|
||||||
|
* @author FatttSnake, fatttsnake@gmail.com
|
||||||
|
* @since 1.0.0
|
||||||
|
* @see LocalDateTime
|
||||||
|
*/
|
||||||
|
@Schema(description = "修改时间", example = "1900-01-01T00:00:00.000Z")
|
||||||
val updateTime: LocalDateTime?
|
val updateTime: LocalDateTime?
|
||||||
)
|
)
|
||||||
@@ -19,5 +19,5 @@ create table if not exists t_b_tool_main
|
|||||||
update_time datetime not null default (utc_timestamp()) comment '修改时间',
|
update_time datetime not null default (utc_timestamp()) comment '修改时间',
|
||||||
deleted bigint not null default 0,
|
deleted bigint not null default 0,
|
||||||
version int not null default 0,
|
version int not null default 0,
|
||||||
constraint t_b_tool_main_unique_tool_id unique (tool_id, author_id, deleted)
|
constraint t_b_tool_main_unique_tool_id unique (tool_id, author_id, ver, deleted)
|
||||||
) comment '工具-主表';
|
) comment '工具-主表';
|
||||||
Reference in New Issue
Block a user