mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 18:32:48 +00:00
28 lines
775 B
SQL
28 lines
775 B
SQL
select *
|
|
from (select "id"::text,
|
|
"name",
|
|
"desc",
|
|
"is_publish",
|
|
"type",
|
|
'application' as "resource_type",
|
|
"workspace_id",
|
|
"folder_id",
|
|
"user_id",
|
|
"create_time",
|
|
"update_time"
|
|
from application
|
|
${application_custom_sql}
|
|
UNION
|
|
select "id",
|
|
"name",
|
|
"desc",
|
|
true as "is_publish",
|
|
'folder' as "type",
|
|
'folder' as "resource_type",
|
|
"workspace_id",
|
|
"parent_id" as "folder_id",
|
|
"user_id",
|
|
"create_time",
|
|
"update_time"
|
|
from application_folder ${folder_query_set}) temp
|
|
${application_query_set} |