feat(imports): add real pricing and subscription collectors

Add plan catalog and subscription schema support, seed baselines, and real importers for core domestic subscriptions plus stable official pricing sources.

This commit also hardens the shared fetch layers so the importers can support live collection and database writes instead of relying on manual placeholders alone.
This commit is contained in:
phamnazage-jpg
2026-05-15 22:32:57 +08:00
parent dd58c18fe3
commit 958245537a
91 changed files with 10474 additions and 1 deletions

View File

@@ -0,0 +1,21 @@
DO $$
BEGIN
IF EXISTS (SELECT 1 FROM pg_constraint WHERE conname = 'chk_models_date_source_kind') THEN
ALTER TABLE models DROP CONSTRAINT chk_models_date_source_kind;
END IF;
ALTER TABLE models
ADD CONSTRAINT chk_models_date_source_kind
CHECK (
date_source_kind IN (
'official_announcement',
'official_product_page',
'official_pricing',
'secondary_authoritative_report',
'catalog_backfill',
'unknown'
)
);
END $$;
COMMENT ON COLUMN models.date_source_kind IS '发布日期证据来源类型official_announcement / official_product_page / official_pricing / secondary_authoritative_report / catalog_backfill / unknown';