--[[----------------------------------------------------------------------------

WFCatSearchByActivity.lua

--------------------------------------------------------------------------------

ADOBE CONFIDENTIAL
------------------
Copyright 2023 Adobe
All Rights Reserved.

NOTICE: All information contained herein is, and remains
the property of Adobe and its suppliers, if any. The intellectual
and technical concepts contained herein are proprietary to Adobe
and its suppliers and are protected by all applicable intellectual
property laws, including trade secret and copyright laws.
Dissemination of this information or reproduction of this material
is strictly forbidden unless prior written permission is obtained
from Adobe.

----------------------------------------------------------------------------]]--


local WFCatSearchByActivity = {}

--------------------------------------------------------------------------------

function WFCatSearchByActivity.addSearchToSearchSchema( searchSchema )

	searchSchema:addSearchableData {
		term = 'favorites',
		dataType = 'fullTextSearch',
		
		sql = [[
			SELECT DISTINCT assets.docId 
				FROM assets
					INNER JOIN spacefavorite ON spacefavorite.assetId == assets.assetId
				ORDER BY assets.docId
		]],
	}
	
	searchSchema:addSearchableData {
		term = 'comments',
		dataType = 'fullTextSearch',
		
		sql = [[
			SELECT DISTINCT assets.docId 
				FROM assets
					INNER JOIN comment ON comment.assetId == assets.assetId
				ORDER BY assets.docId
		]],
	}
	
	
	
end
--==============================================================================

return WFCatSearchByActivity