feat: add RelationInsight API and wire H5 relation/profile pages
Second P1 growth engine: compare two profiles, gate full tips behind deep-access mock payment, and list personal archives on /profile. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
CREATE TABLE IF NOT EXISTS relation_insights (
|
||||
id uuid PRIMARY KEY DEFAULT gen_random_uuid(),
|
||||
user_id uuid NOT NULL REFERENCES users(id),
|
||||
profile_a_id uuid NOT NULL REFERENCES profiles(id),
|
||||
profile_b_id uuid NOT NULL REFERENCES profiles(id),
|
||||
summary jsonb NOT NULL DEFAULT '{}',
|
||||
report_id uuid NULL REFERENCES growth_reports(id),
|
||||
created_at timestamptz NOT NULL DEFAULT now(),
|
||||
updated_at timestamptz NOT NULL DEFAULT now(),
|
||||
deleted_at timestamptz NULL
|
||||
);
|
||||
CREATE INDEX IF NOT EXISTS idx_relation_insights_user_id ON relation_insights(user_id);
|
||||
CREATE INDEX IF NOT EXISTS idx_relation_insights_profiles ON relation_insights(profile_a_id, profile_b_id);
|
||||
Reference in New Issue
Block a user