refactor(tenant): drop legacy plugin_installations, migrate monitoring to desktop_clients
Hard cutover from the browser-extension plugin flow to desktop clients: remove plugin_installations/plugin_sessions tables and related service, handler, router, and generated model code; migrate monitoring quotas and collector types to desktop_clients (UUID primary_client_id); recreate platform_access_snapshots keyed by client_id; update dev-seed and callback types accordingly; mark legacy design docs as historical. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -484,40 +484,6 @@ type PlatformUserRole struct {
|
||||
DeletedAt pgtype.Timestamptz `json:"deleted_at"`
|
||||
}
|
||||
|
||||
type PluginInstallation struct {
|
||||
ID int64 `json:"id"`
|
||||
TenantID int64 `json:"tenant_id"`
|
||||
UserID int64 `json:"user_id"`
|
||||
InstallationKey string `json:"installation_key"`
|
||||
InstallationName string `json:"installation_name"`
|
||||
BrowserName pgtype.Text `json:"browser_name"`
|
||||
ClientVersion pgtype.Text `json:"client_version"`
|
||||
InstallationTokenHash string `json:"installation_token_hash"`
|
||||
Status string `json:"status"`
|
||||
LastSeenAt pgtype.Timestamptz `json:"last_seen_at"`
|
||||
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
||||
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
||||
DeletedAt pgtype.Timestamptz `json:"deleted_at"`
|
||||
}
|
||||
|
||||
type PluginSession struct {
|
||||
ID int64 `json:"id"`
|
||||
TenantID int64 `json:"tenant_id"`
|
||||
UserID int64 `json:"user_id"`
|
||||
PluginInstallationID pgtype.Int8 `json:"plugin_installation_id"`
|
||||
ActionType string `json:"action_type"`
|
||||
ResourceType pgtype.Text `json:"resource_type"`
|
||||
ResourceID pgtype.Int8 `json:"resource_id"`
|
||||
PlatformAccountID pgtype.Int8 `json:"platform_account_id"`
|
||||
PlatformID string `json:"platform_id"`
|
||||
SessionToken string `json:"session_token"`
|
||||
ClientVersion pgtype.Text `json:"client_version"`
|
||||
Status string `json:"status"`
|
||||
ExpireAt pgtype.Timestamptz `json:"expire_at"`
|
||||
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
||||
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
||||
}
|
||||
|
||||
type PromptRule struct {
|
||||
ID int64 `json:"id"`
|
||||
TenantID int64 `json:"tenant_id"`
|
||||
@@ -681,7 +647,7 @@ type TenantMonitoringQuota struct {
|
||||
QuestionSelectionMode string `json:"question_selection_mode"`
|
||||
CollectFrequency string `json:"collect_frequency"`
|
||||
EnabledPlatforms []byte `json:"enabled_platforms"`
|
||||
PrimaryInstallationID pgtype.Int8 `json:"primary_installation_id"`
|
||||
PrimaryClientID pgtype.UUID `json:"primary_client_id"`
|
||||
TaskDailyHardCap int32 `json:"task_daily_hard_cap"`
|
||||
PlanTier string `json:"plan_tier"`
|
||||
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
||||
|
||||
Reference in New Issue
Block a user