-- 新建 visitor_info 表，存储域名联系人信息
CREATE TABLE IF NOT EXISTS domain_monitor.visitor_info (
    id SERIAL PRIMARY KEY,
    domain_id INT NOT NULL UNIQUE,
    name VARCHAR(100),
    phone VARCHAR(50),
    email VARCHAR(200),
    created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
    updated_at TIMESTAMP WITH TIME ZONE,
    CONSTRAINT fk_visitor_domain FOREIGN KEY (domain_id) REFERENCES domain_monitor.monitored_domains(id) ON DELETE CASCADE
);
