feat: add brand asset cleanup worker and related functionality
- Implemented a new BrandAssetCleanupWorker to handle the cleanup of brand-related assets after a brand is deleted. - Added SQL queries for cleaning up articles, keywords, questions, competitors, and monitoring data associated with a brand. - Introduced a new API endpoint to delete publish records. - Updated the router to include the new delete publish record endpoint. - Added tests for the BrandAssetCleanupWorker to ensure proper functionality. - Created migration scripts to support soft deletion of publish records and to add the brand asset cleanup scheduler job.
This commit is contained in:
@@ -1262,6 +1262,9 @@ export interface PublishRecord {
|
||||
id: number
|
||||
publish_batch_id: number
|
||||
article_id: number
|
||||
brand_id: number
|
||||
brand_name?: string | null
|
||||
brand_deleted?: boolean
|
||||
article_title?: string | null
|
||||
platform_account_id?: number | null
|
||||
desktop_account_id: string | null
|
||||
@@ -1296,6 +1299,10 @@ export interface PublishRecordListResponse {
|
||||
history_total: number
|
||||
}
|
||||
|
||||
export interface DeletePublishRecordResponse {
|
||||
deleted: boolean
|
||||
}
|
||||
|
||||
export type EnterpriseSiteCmsType = 'pbootcms' | 'wordpress'
|
||||
export type EnterpriseSiteStatus = 'draft' | 'connected' | 'error' | 'disabled'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user