Add tool tables
This commit is contained in:
@@ -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)"
|
||||
}
|
||||
}
|
||||
142
src/main/kotlin/top/fatweb/oxygen/api/entity/tool/Tool.kt
Normal file
142
src/main/kotlin/top/fatweb/oxygen/api/entity/tool/Tool.kt
Normal 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)"
|
||||
}
|
||||
}
|
||||
@@ -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)"
|
||||
}
|
||||
}
|
||||
@@ -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)"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user