Add tool tables

This commit is contained in:
2024-01-16 18:09:46 +08:00
parent 705449c5b1
commit e6688ccc56
27 changed files with 597 additions and 12 deletions

View File

@@ -0,0 +1,5 @@
package top.fatweb.oxygen.api.controller.common
class ToolController {
}

View File

@@ -0,0 +1,64 @@
package top.fatweb.oxygen.api.entity.tool
import com.baomidou.mybatisplus.annotation.*
import java.io.Serializable
/**
* Tool category intermediate entity
*
* @author FatttSnake, fatttsnake@gmail.com
* @since 1.0.0
*/
@TableName("t_r_tool_main_category")
class RToolCategory : Serializable {
/**
* ID
*
* @author FatttSnake, fatttsnake@gmail.com
* @since 1.0.0
*/
@TableId("id")
var id: Long? = null
/**
* Tool ID
*
* @author FatttSnake, fatttsnake@gmail.com
* @since 1.0.0
*/
@TableField("tool_id")
var toolId: Long? = null
/**
* Category ID
*
* @author FatttSnake, fatttsnake@gmail.com
* @since 1.0.0
*/
@TableField("category_id")
var categoryId: Long? = null
/**
* Deleted
*
* @author FatttSnake, fatttsnake@gmail.com
* @since 1.0.0
*/
@TableField("deleted")
@TableLogic
var deleted: Long? = null
/**
* Version
*
* @author FatttSnake, fatttsnake@gmail.com
* @since 1.0.0
*/
@TableField("version")
@Version
var version: Int? = null
override fun toString(): String {
return "RToolCategory(id=$id, toolId=$toolId, categoryId=$categoryId, deleted=$deleted, version=$version)"
}
}

View File

@@ -0,0 +1,142 @@
package top.fatweb.oxygen.api.entity.tool
import com.baomidou.mybatisplus.annotation.*
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler
/**
* Tool entity
*
* @author FatttSnake, fatttsnake@gmail.com
* @since 1.0.0
*/
@TableName("t_b_tool_main", autoResultMap = true)
class Tool {
/**
* ID
*
* @author FatttSnake, fatttsnake@gmail.com
* @since 1.0.0
*/
@TableId("id")
var id: Long? = null
/**
* Name
*
* @author FatttSnake, fatttsnake@gmail.com
* @since 1.0.0
*/
@TableField("name")
var name: String? = null
/**
* Tool ID
*
* @author FatttSnake, fatttsnake@gmail.com
* @since 1.0.0
*/
@TableField("tool_id")
var toolId: String? = null
/**
* Description
*
* @author FatttSnake, fatttsnake@gmail.com
* @since 1.0.0
*/
@TableField("description")
var description: String? = null
/**
* Author
*
* @author FatttSnake, fatttsnake@gmail.com
* @since 1.0.0
*/
@TableField("author")
var author: Long? = null
/**
* Version of tool
*
* @author FatttSnake, fatttsnake@gmail.com
* @since 1.0.0
*/
@TableField("ver")
var ver: String? = null
/**
* Privately
*
* @author FatttSnake, fatttsnake@gmail.com
* @since 1.0.0
*/
@TableField("privately")
var privately: Int? = null
/**
* Keyword
*
* @author FatttSnake, fatttsnake@gmail.com
* @since 1.0.0
*/
@TableField("keyword", typeHandler = JacksonTypeHandler::class)
var keyword: List<String>? = null
/**
* Source code
*
* @author FatttSnake, fatttsnake@gmail.com
* @since 1.0.0
*/
@TableField("source")
var source: Long? = null
/**
* Compile product
*
* @author FatttSnake, fatttsnake@gmail.com
* @since 1.0.0
*/
var dist: Long? = null
/**
* Publish
*
* @author FatttSnake, fatttsnake@gmail.com
* @since 1.0.0
*/
var publish: Int? = null
/**
* Review
*
* @author FatttSnake, fatttsnake@gmail.com
* @since 1.0.0
*/
var review: Int? = null
/**
* Deleted
*
* @author FatttSnake, fatttsnake@gmail.com
* @since 1.0.0
*/
@TableField("deleted")
@TableLogic
var deleted: Long? = null
/**
* Version
*
* @author FatttSnake, fatttsnake@gmail.com
* @since 1.0.0
*/
@TableField("version")
@Version
var version: Int? = null
override fun toString(): String {
return "Tool(id=$id, name=$name, toolId=$toolId, description=$description, author=$author, ver=$ver, privately=$privately, keyword=$keyword, source=$source, dist=$dist, publish=$publish, review=$review, deleted=$deleted, version=$version)"
}
}

View File

@@ -0,0 +1,63 @@
package top.fatweb.oxygen.api.entity.tool
import com.baomidou.mybatisplus.annotation.*
/**
* Tool category entity
*
* @author FatttSnake, fatttsnake@gmail.com
* @since 1.0.0
*/
@TableName("t_b_tool_category")
class ToolCategory {
/**
* ID
*
* @author FatttSnake, fatttsnake@gmail.com
* @since 1.0.0
*/
@TableId("id")
var id: Long? = null
/**
* Name
*
* @author FatttSnake, fatttsnake@gmail.com
* @since 1.0.0
*/
@TableField("name")
var name: String? = null
/**
* Enabel
*
* @author FatttSnake, fatttsnake@gmail.com
* @since 1.0.0
*/
@TableField("enable")
var enable: Int? = null
/**
* Deleted
*
* @author FatttSnake, fatttsnake@gmail.com
* @since 1.0.0
*/
@TableField("deleted")
@TableLogic
var deleted: Long? = null
/**
* Version
*
* @author FatttSnake, fatttsnake@gmail.com
* @since 1.0.0
*/
@TableField("version")
@Version
var version: Int? = null
override fun toString(): String {
return "ToolCategory(id=$id, name=$name, enable=$enable, deleted=$deleted, version=$version)"
}
}

View File

@@ -0,0 +1,36 @@
package top.fatweb.oxygen.api.entity.tool
import com.baomidou.mybatisplus.annotation.TableField
import com.baomidou.mybatisplus.annotation.TableId
import com.baomidou.mybatisplus.annotation.TableName
/**
* Tool data entity
*
* @author FatttSnake, fatttsnake@gmail.com
* @since 1.0.0
*/
@TableName("t_b_tool_data")
class ToolData {
/**
* ID
*
* @author FatttSnake, fatttsnake@gmail.com
* @since 1.0.0
*/
@TableId("id")
var id: Long? = null
/**
* Data
*
* @author FatttSnake, fatttsnake@gmail.com
* @since 1.0.0
*/
@TableField("data")
var data: String? = null
override fun toString(): String {
return "ToolData(id=$id, data=$data)"
}
}

View File

@@ -9,6 +9,8 @@ import top.fatweb.oxygen.api.entity.system.EventLog
*
* @author FatttSnake, fatttsnake@gmail.com
* @since 1.0.0
* @see BaseMapper
* @see EventLog
*/
@Mapper
interface EventLogMapper : BaseMapper<EventLog>

View File

@@ -9,6 +9,8 @@ import top.fatweb.oxygen.api.entity.system.SensitiveWord
*
* @author FatttSnake, fatttsnake@gmail.com
* @since 1.0.0
* @see BaseMapper
* @see SensitiveWord
*/
@Mapper
interface SensitiveWordMapper : BaseMapper<SensitiveWord>

View File

@@ -9,6 +9,8 @@ import top.fatweb.oxygen.api.entity.system.StatisticsLog
*
* @author FatttSnake, fatttsnake@gmail.com
* @since 1.0.0
* @see BaseMapper
* @see StatisticsLog
*/
@Mapper
interface StatisticsLogMapper : BaseMapper<StatisticsLog>

View File

@@ -0,0 +1,16 @@
package top.fatweb.oxygen.api.mapper.tool
import com.baomidou.mybatisplus.core.mapper.BaseMapper
import org.apache.ibatis.annotations.Mapper
import top.fatweb.oxygen.api.entity.tool.RToolCategory
/**
* Tool category intermediate mapper
*
* @author FatttSnake, fatttsnake@gmail.com
* @since 1.0.0
* @see BaseMapper
* @see RToolCategory
*/
@Mapper
interface RToolCategoryMapper : BaseMapper<RToolCategory>

View File

@@ -0,0 +1,16 @@
package top.fatweb.oxygen.api.mapper.tool
import com.baomidou.mybatisplus.core.mapper.BaseMapper
import org.apache.ibatis.annotations.Mapper
import top.fatweb.oxygen.api.entity.tool.ToolCategory
/**
* Tool category mapper
*
* @author FatttSnake, fatttsnake@gmail.com
* @since 1.0.0
* @see BaseMapper
* @see ToolCategory
*/
@Mapper
interface ToolCategoryMapper : BaseMapper<ToolCategory>

View File

@@ -0,0 +1,16 @@
package top.fatweb.oxygen.api.mapper.tool
import com.baomidou.mybatisplus.core.mapper.BaseMapper
import org.apache.ibatis.annotations.Mapper
import top.fatweb.oxygen.api.entity.tool.ToolData
/**
* Tool data mapper
*
* @author FatttSnake, fatttsnake@gmail.com
* @since 1.0.0
* @see BaseMapper
* @see ToolData
*/
@Mapper
interface ToolDataMapper : BaseMapper<ToolData>

View File

@@ -0,0 +1,16 @@
package top.fatweb.oxygen.api.mapper.tool
import com.baomidou.mybatisplus.core.mapper.BaseMapper
import org.apache.ibatis.annotations.Mapper
import top.fatweb.oxygen.api.entity.tool.Tool
/**
* Tool mapper
*
* @author FatttSnake, fatttsnake@gmail.com
* @since 1.0.0
* @see BaseMapper
* @see Tool
*/
@Mapper
interface ToolMapper : BaseMapper<Tool>

View File

@@ -0,0 +1,14 @@
package top.fatweb.oxygen.api.service.tool
import com.baomidou.mybatisplus.extension.service.IService
import top.fatweb.oxygen.api.entity.tool.RToolCategory
/**
* Tool category intermediate service interface
*
* @author FatttSnake, fatttsnake@gmail.com
* @since 1.0.0
* @see IService
* @see RToolCategory
*/
interface IRToolCategoryService : IService<RToolCategory>

View File

@@ -0,0 +1,14 @@
package top.fatweb.oxygen.api.service.tool
import com.baomidou.mybatisplus.extension.service.IService
import top.fatweb.oxygen.api.entity.tool.ToolCategory
/**
* Tool category service interface
*
* @author FatttSnake, fatttsnake@gmail.com
* @since 1.0.0
* @see IService
* @see ToolCategory
*/
interface IToolCategoryService : IService<ToolCategory>

View File

@@ -0,0 +1,14 @@
package top.fatweb.oxygen.api.service.tool
import com.baomidou.mybatisplus.extension.service.IService
import top.fatweb.oxygen.api.entity.tool.ToolData
/**
* Tool data service interface
*
* @author FatttSnake, fatttsnake@gmail.com
* @since 1.0.0
* @see IService
* @see ToolData
*/
interface IToolDataService : IService<ToolData>

View File

@@ -0,0 +1,14 @@
package top.fatweb.oxygen.api.service.tool
import com.baomidou.mybatisplus.extension.service.IService
import top.fatweb.oxygen.api.entity.tool.Tool
/**
* Tool service interface
*
* @author FatttSnake, fatttsnake@gmail.com
* @since 1.0.0
* @see IService
* @see Tool
*/
interface IToolService : IService<Tool>

View File

@@ -0,0 +1,18 @@
package top.fatweb.oxygen.api.service.tool.impl
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
import top.fatweb.oxygen.api.entity.tool.RToolCategory
import top.fatweb.oxygen.api.mapper.tool.RToolCategoryMapper
import top.fatweb.oxygen.api.service.tool.IRToolCategoryService
/**
* Tool category service implement
*
* @author FatttSnake, fatttsnake@gmail.com
* @since 1.0.0
* @see ServiceImpl
* @see RToolCategoryMapper
* @see RToolCategory
* @see IRToolCategoryService
*/
class RToolCategoryServiceImpl : ServiceImpl<RToolCategoryMapper, RToolCategory>(), IRToolCategoryService

View File

@@ -0,0 +1,18 @@
package top.fatweb.oxygen.api.service.tool.impl
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
import top.fatweb.oxygen.api.entity.tool.ToolCategory
import top.fatweb.oxygen.api.mapper.tool.ToolCategoryMapper
import top.fatweb.oxygen.api.service.tool.IToolCategoryService
/**
* Tool category service implement
*
* @author FatttSnake, fatttsnake@gmail.com
* @since 1.0.0
* @see ServiceImpl
* @see ToolCategoryMapper
* @see ToolCategory
* @see IToolCategoryService
*/
class ToolCategoryServiceImpl : ServiceImpl<ToolCategoryMapper, ToolCategory>(), IToolCategoryService

View File

@@ -0,0 +1,18 @@
package top.fatweb.oxygen.api.service.tool.impl
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
import top.fatweb.oxygen.api.entity.tool.ToolData
import top.fatweb.oxygen.api.mapper.tool.ToolDataMapper
import top.fatweb.oxygen.api.service.tool.IToolDataService
/**
* Tool data service implement
*
* @author FatttSnake, fatttsnake@gmail.com
* @since 1.0.0
* @see ServiceImpl
* @see ToolDataMapper
* @see ToolData
* @see IToolDataService
*/
class ToolDataServiceImpl : ServiceImpl<ToolDataMapper, ToolData>(), IToolDataService

View File

@@ -0,0 +1,18 @@
package top.fatweb.oxygen.api.service.tool.impl
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
import top.fatweb.oxygen.api.entity.tool.Tool
import top.fatweb.oxygen.api.mapper.tool.ToolMapper
import top.fatweb.oxygen.api.service.tool.IToolService
/**
* Tool service implement
*
* @author FatttSnake, fatttsnake@gmail.com
* @since 1.0.0
* @see ServiceImpl
* @see ToolMapper
* @see Tool
* @see IToolService
*/
class ToolServiceImpl : ServiceImpl<ToolMapper, Tool>(), IToolService