-- 상담 이력 테이블
CREATE TABLE IF NOT EXISTS consultations (
    id                  SERIAL PRIMARY KEY,
    client_id           INT          NOT NULL REFERENCES clients(id) ON DELETE CASCADE,
    consultation_date   DATE         NOT NULL DEFAULT CURRENT_DATE,
    service_type        VARCHAR(50),
    summary             TEXT         NOT NULL,
    result              VARCHAR(30),    -- consulting, contracted, rejected, pending, completed
    fee                 NUMERIC(12,0),
    created_at          TIMESTAMPTZ  NOT NULL DEFAULT NOW()
);

CREATE INDEX IF NOT EXISTS idx_consultations_client ON consultations (client_id);
