-- 10. UGC CONTENT CREATOR PROFILES
CREATE TABLE IF NOT EXISTS ugc_content_creator_profiles (
    id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
    user_id UUID NOT NULL REFERENCES users(id) ON DELETE CASCADE UNIQUE,
    display_name VARCHAR(255) NOT NULL DEFAULT '',
    bio TEXT,
    location VARCHAR(255),
    -- Profession-specific
    platforms TEXT[] DEFAULT '{}',          -- e.g. ['Instagram', 'YouTube', 'TikTok']
    content_niches TEXT[] DEFAULT '{}',     -- e.g. ['Beauty', 'Tech', 'Food', 'Lifestyle']
    content_formats TEXT[] DEFAULT '{}',    -- e.g. ['Reels', 'Unboxing', 'Reviews', 'GRWM']
    follower_count INTEGER DEFAULT 0,
    avg_views_per_post INTEGER DEFAULT 0,
    has_media_kit BOOLEAN NOT NULL DEFAULT false,
    instagram_handle VARCHAR(100),
    youtube_channel_url VARCHAR(500),
    portfolio_url VARCHAR(500),
    starting_price_inr INTEGER DEFAULT 0,   -- in paise
    custom_data JSONB,
    -- Verification & status
    status VARCHAR(50) NOT NULL DEFAULT 'PENDING', -- PENDING, APPROVED, REJECTED, SUSPENDED
    rejection_reason TEXT,
    approved_at TIMESTAMPTZ,
    created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
    updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
);

CREATE INDEX IF NOT EXISTS idx_ugc_content_creator_profiles_status ON ugc_content_creator_profiles(status);
CREATE INDEX IF NOT EXISTS idx_ugc_content_creator_profiles_user_id ON ugc_content_creator_profiles(user_id);
