Files
geo/server/internal/tenant/repository/generated/querier.go
T
2026-05-20 15:37:25 +08:00

216 lines
18 KiB
Go

// Code generated by sqlc. DO NOT EDIT.
// versions:
// sqlc v1.30.0
package generated
import (
"context"
"github.com/jackc/pgx/v5/pgtype"
)
type Querier interface {
ApproveKolSubscription(ctx context.Context, arg ApproveKolSubscriptionParams) error
CancelDesktopTaskByClient(ctx context.Context, arg CancelDesktopTaskByClientParams) (DesktopTask, error)
CancelDesktopTaskByLease(ctx context.Context, arg CancelDesktopTaskByLeaseParams) (DesktopTask, error)
ClearDesktopAccountDeleteRequested(ctx context.Context, arg ClearDesktopAccountDeleteRequestedParams) (ClearDesktopAccountDeleteRequestedRow, error)
CompleteDesktopTask(ctx context.Context, arg CompleteDesktopTaskParams) (DesktopTask, error)
ConfirmReservation(ctx context.Context, arg ConfirmReservationParams) error
CountActiveImagesInFolder(ctx context.Context, arg CountActiveImagesInFolderParams) (int32, error)
CountArticles(ctx context.Context, arg CountArticlesParams) (int64, error)
CountArticlesByTenantAndBrand(ctx context.Context, arg CountArticlesByTenantAndBrandParams) (int64, error)
CountBrandsByTenant(ctx context.Context, tenantID int64) (int64, error)
CountImageAssets(ctx context.Context, arg CountImageAssetsParams) (int32, error)
CountImageReferences(ctx context.Context, arg CountImageReferencesParams) (int32, error)
CountPromptRules(ctx context.Context, arg CountPromptRulesParams) (int64, error)
CountPromptRulesUngrouped(ctx context.Context, tenantID int64) (int64, error)
CountPublishedArticlesByTenantAndBrand(ctx context.Context, arg CountPublishedArticlesByTenantAndBrandParams) (int64, error)
CountScheduleTasks(ctx context.Context, arg CountScheduleTasksParams) (int64, error)
CountUncategorizedImages(ctx context.Context, tenantID int64) (int32, error)
CreateArticle(ctx context.Context, arg CreateArticleParams) (int64, error)
CreateArticleVersion(ctx context.Context, arg CreateArticleVersionParams) (int64, error)
CreateAuditLog(ctx context.Context, arg CreateAuditLogParams) error
CreateBrand(ctx context.Context, arg CreateBrandParams) (CreateBrandRow, error)
CreateCompetitor(ctx context.Context, arg CreateCompetitorParams) (CreateCompetitorRow, error)
CreateDesktopPublishJob(ctx context.Context, arg CreateDesktopPublishJobParams) (DesktopPublishJob, error)
CreateDesktopTask(ctx context.Context, arg CreateDesktopTaskParams) (DesktopTask, error)
CreateDesktopTaskAttempt(ctx context.Context, arg CreateDesktopTaskAttemptParams) (DesktopTaskAttempt, error)
CreateGenerationTask(ctx context.Context, arg CreateGenerationTaskParams) (int64, error)
CreateImageFolder(ctx context.Context, arg CreateImageFolderParams) (int64, error)
CreateKeyword(ctx context.Context, arg CreateKeywordParams) (CreateKeywordRow, error)
CreateKolAssistTask(ctx context.Context, arg CreateKolAssistTaskParams) error
CreateKolPackage(ctx context.Context, arg CreateKolPackageParams) (CreateKolPackageRow, error)
CreateKolPrompt(ctx context.Context, arg CreateKolPromptParams) (CreateKolPromptRow, error)
CreateKolPromptRevision(ctx context.Context, arg CreateKolPromptRevisionParams) (CreateKolPromptRevisionRow, error)
CreateKolSubscription(ctx context.Context, arg CreateKolSubscriptionParams) (KolSubscription, error)
CreateKolUsageLog(ctx context.Context, arg CreateKolUsageLogParams) (CreateKolUsageLogRow, error)
CreatePromptRule(ctx context.Context, arg CreatePromptRuleParams) (CreatePromptRuleRow, error)
CreatePromptRuleGroup(ctx context.Context, arg CreatePromptRuleGroupParams) (CreatePromptRuleGroupRow, error)
CreateQuestion(ctx context.Context, arg CreateQuestionParams) (int64, error)
CreateQuotaReservation(ctx context.Context, arg CreateQuotaReservationParams) (int64, error)
CreateScheduleTask(ctx context.Context, arg CreateScheduleTaskParams) (CreateScheduleTaskRow, error)
CreateSubscriptionPrompt(ctx context.Context, arg CreateSubscriptionPromptParams) error
CreateTaskRecord(ctx context.Context, arg CreateTaskRecordParams) (int64, error)
DeleteImageFolder(ctx context.Context, arg DeleteImageFolderParams) error
DeleteImageReferencesByArticle(ctx context.Context, arg DeleteImageReferencesByArticleParams) error
DeleteImageReferencesByArticleScope(ctx context.Context, arg DeleteImageReferencesByArticleScopeParams) error
EnsureImageStorageUsageRow(ctx context.Context, tenantID int64) error
ExtendDesktopTaskLease(ctx context.Context, arg ExtendDesktopTaskLeaseParams) (DesktopTask, error)
FinishDesktopTaskAttempt(ctx context.Context, arg FinishDesktopTaskAttemptParams) error
GetActiveKolSubscription(ctx context.Context, arg GetActiveKolSubscriptionParams) (KolSubscription, error)
GetActivePlanForTenant(ctx context.Context, tenantID int64) (GetActivePlanForTenantRow, error)
GetArticleByID(ctx context.Context, arg GetArticleByIDParams) (GetArticleByIDRow, error)
GetArticleVersions(ctx context.Context, articleID int64) ([]GetArticleVersionsRow, error)
GetBrandByID(ctx context.Context, arg GetBrandByIDParams) (GetBrandByIDRow, error)
GetCurrentBalance(ctx context.Context, arg GetCurrentBalanceParams) (int32, error)
GetDesktopAccountByDesktopID(ctx context.Context, arg GetDesktopAccountByDesktopIDParams) (GetDesktopAccountByDesktopIDRow, error)
GetDesktopAccountByIdentity(ctx context.Context, arg GetDesktopAccountByIdentityParams) (GetDesktopAccountByIdentityRow, error)
GetDesktopClientByID(ctx context.Context, arg GetDesktopClientByIDParams) (DesktopClient, error)
GetDesktopClientByTokenHash(ctx context.Context, tokenHash []byte) (DesktopClient, error)
GetDesktopTaskByDesktopID(ctx context.Context, arg GetDesktopTaskByDesktopIDParams) (DesktopTask, error)
GetImageAsset(ctx context.Context, arg GetImageAssetParams) (GetImageAssetRow, error)
GetImageFolder(ctx context.Context, arg GetImageFolderParams) (GetImageFolderRow, error)
GetImageStorageUsage(ctx context.Context, tenantID int64) (GetImageStorageUsageRow, error)
GetKolAssistTask(ctx context.Context, arg GetKolAssistTaskParams) (KolAssistTask, error)
GetKolPackageByID(ctx context.Context, arg GetKolPackageByIDParams) (GetKolPackageByIDRow, error)
GetKolProfileByID(ctx context.Context, id int64) (GetKolProfileByIDRow, error)
GetKolProfileByUser(ctx context.Context, arg GetKolProfileByUserParams) (GetKolProfileByUserRow, error)
GetKolPromptByID(ctx context.Context, arg GetKolPromptByIDParams) (GetKolPromptByIDRow, error)
GetKolPromptRevision(ctx context.Context, arg GetKolPromptRevisionParams) (GetKolPromptRevisionRow, error)
GetKolSubscriptionByID(ctx context.Context, arg GetKolSubscriptionByIDParams) (KolSubscription, error)
// Cross-tenant read: V1 tenant-admin endpoints temporarily manage subscriptions here
// until a dedicated platform-api exists.
GetKolSubscriptionByIDAny(ctx context.Context, id int64) (KolSubscription, error)
GetKolUsageByGenerationTask(ctx context.Context, arg GetKolUsageByGenerationTaskParams) (GetKolUsageByGenerationTaskRow, error)
GetPromptRuleByID(ctx context.Context, arg GetPromptRuleByIDParams) (GetPromptRuleByIDRow, error)
GetPublishedKolPackage(ctx context.Context, id int64) (GetPublishedKolPackageRow, error)
GetQuotaSummary(ctx context.Context, tenantID int64) (int32, error)
GetRecentArticlesByBrand(ctx context.Context, arg GetRecentArticlesByBrandParams) ([]GetRecentArticlesByBrandRow, error)
GetScheduleTaskByID(ctx context.Context, arg GetScheduleTaskByIDParams) (GetScheduleTaskByIDRow, error)
GetSubscriptionPromptByID(ctx context.Context, arg GetSubscriptionPromptByIDParams) (GetSubscriptionPromptByIDRow, error)
GetTemplateByID(ctx context.Context, arg GetTemplateByIDParams) (GetTemplateByIDRow, error)
GetTenantMembership(ctx context.Context, userID int64) (GetTenantMembershipRow, error)
GetTenantMembershipByTenantAndUser(ctx context.Context, arg GetTenantMembershipByTenantAndUserParams) (GetTenantMembershipByTenantAndUserRow, error)
GetUserByEmail(ctx context.Context, email pgtype.Text) (GetUserByEmailRow, error)
GetUserByID(ctx context.Context, id int64) (GetUserByIDRow, error)
GetUserByLoginIdentifier(ctx context.Context, loginIdentifier pgtype.Text) (GetUserByLoginIdentifierRow, error)
HeartbeatDesktopClient(ctx context.Context, arg HeartbeatDesktopClientParams) (DesktopClient, error)
InsertImageAsset(ctx context.Context, arg InsertImageAssetParams) (int64, error)
InsertQuotaLedger(ctx context.Context, arg InsertQuotaLedgerParams) (int64, error)
// Cross-tenant aggregation: KOL owns packages across subscriber tenants.
KolDashboardOverview(ctx context.Context, packageIds []int64) (KolDashboardOverviewRow, error)
// Returns a per-day series combining usage count and new subscription count for KOL dashboard.
KolDashboardTrend(ctx context.Context, arg KolDashboardTrendParams) ([]KolDashboardTrendRow, error)
// Cross-tenant aggregation for KOL dashboard.
KolUsageCountByPackage(ctx context.Context, packageIds []int64) ([]KolUsageCountByPackageRow, error)
LeaseNextQueuedDesktopTask(ctx context.Context, arg LeaseNextQueuedDesktopTaskParams) (DesktopTask, error)
LeaseQueuedDesktopTaskByDesktopID(ctx context.Context, arg LeaseQueuedDesktopTaskByDesktopIDParams) (DesktopTask, error)
ListActiveImagesByFolder(ctx context.Context, arg ListActiveImagesByFolderParams) ([]ListActiveImagesByFolderRow, error)
ListActiveKolPromptsByPackage(ctx context.Context, arg ListActiveKolPromptsByPackageParams) ([]ListActiveKolPromptsByPackageRow, error)
// Cross-tenant read: used by platform admin for subscription fan-out.
// Excludes expired subscriptions so new prompts are not granted to them.
ListActiveSubscribersForPackage(ctx context.Context, packageID int64) ([]KolSubscription, error)
ListAllPromptRulesSimple(ctx context.Context, tenantID int64) ([]ListAllPromptRulesSimpleRow, error)
ListArticles(ctx context.Context, arg ListArticlesParams) ([]ListArticlesRow, error)
ListBrands(ctx context.Context, tenantID int64) ([]ListBrandsRow, error)
ListCompetitors(ctx context.Context, arg ListCompetitorsParams) ([]ListCompetitorsRow, error)
ListDesktopAccountsByClient(ctx context.Context, arg ListDesktopAccountsByClientParams) ([]ListDesktopAccountsByClientRow, error)
ListDesktopAccountsByUser(ctx context.Context, arg ListDesktopAccountsByUserParams) ([]ListDesktopAccountsByUserRow, error)
ListDesktopClientsByUser(ctx context.Context, arg ListDesktopClientsByUserParams) ([]DesktopClient, error)
ListDesktopClientsByWorkspace(ctx context.Context, workspaceID int64) ([]DesktopClient, error)
ListImageAssets(ctx context.Context, arg ListImageAssetsParams) ([]ListImageAssetsRow, error)
ListImageFolders(ctx context.Context, tenantID int64) ([]ListImageFoldersRow, error)
ListImageReferenceArticles(ctx context.Context, arg ListImageReferenceArticlesParams) ([]ListImageReferenceArticlesRow, error)
ListImageReferences(ctx context.Context, arg ListImageReferencesParams) ([]ListImageReferencesRow, error)
ListKeywords(ctx context.Context, arg ListKeywordsParams) ([]ListKeywordsRow, error)
ListKolCardsForTenant(ctx context.Context, tenantID int64) ([]ListKolCardsForTenantRow, error)
ListKolPackageIDsByProfile(ctx context.Context, arg ListKolPackageIDsByProfileParams) ([]int64, error)
ListKolPackagesByProfile(ctx context.Context, arg ListKolPackagesByProfileParams) ([]ListKolPackagesByProfileRow, error)
ListKolPromptsByPackage(ctx context.Context, arg ListKolPromptsByPackageParams) ([]ListKolPromptsByPackageRow, error)
ListKolSubscriptions(ctx context.Context, tenantID int64) ([]KolSubscription, error)
// ============================================================
// Prompt Rule Groups
// ============================================================
ListPromptRuleGroups(ctx context.Context, tenantID int64) ([]ListPromptRuleGroupsRow, error)
// ============================================================
// Prompt Rules
// ============================================================
ListPromptRules(ctx context.Context, arg ListPromptRulesParams) ([]ListPromptRulesRow, error)
ListPromptRulesUngrouped(ctx context.Context, arg ListPromptRulesUngroupedParams) ([]ListPromptRulesUngroupedRow, error)
ListPublicPromptsForPackage(ctx context.Context, packageID int64) ([]ListPublicPromptsForPackageRow, error)
// Cross-tenant read: marketplace intentionally spans tenants.
// tenant_id appears via kol_profiles.tenant_id join only, so this file is exempt from check_tenant_scope.sh.
ListPublishedKolPackages(ctx context.Context, arg ListPublishedKolPackagesParams) ([]ListPublishedKolPackagesRow, error)
ListQuestions(ctx context.Context, arg ListQuestionsParams) ([]ListQuestionsRow, error)
ListScheduleTasks(ctx context.Context, arg ListScheduleTasksParams) ([]ListScheduleTasksRow, error)
ListSubscriptionPromptsByTenant(ctx context.Context, tenantID int64) ([]ListSubscriptionPromptsByTenantRow, error)
ListTemplates(ctx context.Context, tenantID int64) ([]ListTemplatesRow, error)
MarkDesktopAccountDeleteRequested(ctx context.Context, arg MarkDesktopAccountDeleteRequestedParams) (MarkDesktopAccountDeleteRequestedRow, error)
MarkDesktopTasksUnknownByClient(ctx context.Context, arg MarkDesktopTasksUnknownByClientParams) (int64, error)
MarkImagesInFolderPendingDelete(ctx context.Context, arg MarkImagesInFolderPendingDeleteParams) error
MarkKolAssistCompleted(ctx context.Context, arg MarkKolAssistCompletedParams) error
MarkKolAssistFailed(ctx context.Context, arg MarkKolAssistFailedParams) error
MarkKolAssistStarted(ctx context.Context, arg MarkKolAssistStartedParams) error
MarkKolUsageCompleted(ctx context.Context, arg MarkKolUsageCompletedParams) error
MarkKolUsageCompletedByTask(ctx context.Context, arg MarkKolUsageCompletedByTaskParams) error
MarkKolUsageFailed(ctx context.Context, arg MarkKolUsageFailedParams) error
MarkKolUsageFailedByTask(ctx context.Context, arg MarkKolUsageFailedByTaskParams) error
NextKolPromptRevisionNo(ctx context.Context, arg NextKolPromptRevisionNoParams) (int32, error)
PatchDesktopAccount(ctx context.Context, arg PatchDesktopAccountParams) (PatchDesktopAccountRow, error)
ReconcileDesktopTask(ctx context.Context, arg ReconcileDesktopTaskParams) (DesktopTask, error)
RefundReservation(ctx context.Context, arg RefundReservationParams) error
RegisterDesktopClient(ctx context.Context, arg RegisterDesktopClientParams) (DesktopClient, error)
ReleaseImageStorageQuota(ctx context.Context, arg ReleaseImageStorageQuotaParams) error
RevokeDesktopClient(ctx context.Context, arg RevokeDesktopClientParams) (DesktopClient, error)
RevokeKolSubscription(ctx context.Context, arg RevokeKolSubscriptionParams) error
RevokeSubscriptionPromptsByPrompt(ctx context.Context, arg RevokeSubscriptionPromptsByPromptParams) error
RevokeSubscriptionPromptsBySubscription(ctx context.Context, arg RevokeSubscriptionPromptsBySubscriptionParams) error
RotateDesktopClientToken(ctx context.Context, arg RotateDesktopClientTokenParams) (DesktopClient, error)
SoftDeleteArticle(ctx context.Context, arg SoftDeleteArticleParams) error
SoftDeleteBrand(ctx context.Context, arg SoftDeleteBrandParams) error
SoftDeleteCompetitor(ctx context.Context, arg SoftDeleteCompetitorParams) error
SoftDeleteCompetitorsByBrand(ctx context.Context, arg SoftDeleteCompetitorsByBrandParams) error
SoftDeleteKeyword(ctx context.Context, arg SoftDeleteKeywordParams) error
SoftDeleteKeywordsByBrand(ctx context.Context, arg SoftDeleteKeywordsByBrandParams) error
SoftDeleteKolPackage(ctx context.Context, arg SoftDeleteKolPackageParams) error
SoftDeleteKolPrompt(ctx context.Context, arg SoftDeleteKolPromptParams) error
SoftDeletePromptRule(ctx context.Context, arg SoftDeletePromptRuleParams) error
SoftDeletePromptRuleGroup(ctx context.Context, arg SoftDeletePromptRuleGroupParams) error
SoftDeleteQuestion(ctx context.Context, arg SoftDeleteQuestionParams) error
SoftDeleteQuestionsByBrand(ctx context.Context, arg SoftDeleteQuestionsByBrandParams) error
SoftDeleteScheduleTask(ctx context.Context, arg SoftDeleteScheduleTaskParams) error
TenantCancelDesktopTask(ctx context.Context, arg TenantCancelDesktopTaskParams) (DesktopTask, error)
TombstoneDesktopAccount(ctx context.Context, arg TombstoneDesktopAccountParams) (TombstoneDesktopAccountRow, error)
UpdateArticleCurrentVersion(ctx context.Context, arg UpdateArticleCurrentVersionParams) error
UpdateArticleGenerateStatus(ctx context.Context, arg UpdateArticleGenerateStatusParams) error
UpdateBrand(ctx context.Context, arg UpdateBrandParams) error
UpdateCompetitor(ctx context.Context, arg UpdateCompetitorParams) error
UpdateGenerationTaskStatus(ctx context.Context, arg UpdateGenerationTaskStatusParams) error
UpdateImageAssetDeleted(ctx context.Context, arg UpdateImageAssetDeletedParams) error
UpdateImageAssetFolder(ctx context.Context, arg UpdateImageAssetFolderParams) error
UpdateImageAssetName(ctx context.Context, arg UpdateImageAssetNameParams) error
UpdateImageAssetStatus(ctx context.Context, arg UpdateImageAssetStatusParams) error
UpdateImageFolder(ctx context.Context, arg UpdateImageFolderParams) error
UpdateKeyword(ctx context.Context, arg UpdateKeywordParams) error
UpdateKolPackage(ctx context.Context, arg UpdateKolPackageParams) error
UpdateKolPackageStatus(ctx context.Context, arg UpdateKolPackageStatusParams) error
UpdateKolProfile(ctx context.Context, arg UpdateKolProfileParams) error
UpdateKolPromptDraftRevision(ctx context.Context, arg UpdateKolPromptDraftRevisionParams) error
UpdateKolPromptMetadata(ctx context.Context, arg UpdateKolPromptMetadataParams) error
UpdateKolPromptPublishedRevision(ctx context.Context, arg UpdateKolPromptPublishedRevisionParams) error
UpdateKolPromptStatus(ctx context.Context, arg UpdateKolPromptStatusParams) error
UpdatePromptRule(ctx context.Context, arg UpdatePromptRuleParams) error
UpdatePromptRuleGroup(ctx context.Context, arg UpdatePromptRuleGroupParams) error
UpdatePromptRuleStatus(ctx context.Context, arg UpdatePromptRuleStatusParams) error
UpdateQuestion(ctx context.Context, arg UpdateQuestionParams) error
UpdateQuotaReservationResource(ctx context.Context, arg UpdateQuotaReservationResourceParams) error
UpdateScheduleTask(ctx context.Context, arg UpdateScheduleTaskParams) error
UpdateScheduleTaskStatus(ctx context.Context, arg UpdateScheduleTaskStatusParams) error
UpdateTaskRecordStatus(ctx context.Context, arg UpdateTaskRecordStatusParams) error
UpsertDesktopAccount(ctx context.Context, arg UpsertDesktopAccountParams) (UpsertDesktopAccountRow, error)
UpsertImageReference(ctx context.Context, arg UpsertImageReferenceParams) error
}
var _ Querier = (*Queries)(nil)