CREATE TYPE person_permission AS ENUM (
    'view',
    'can_use'
);

CREATE TABLE person_shares (
    person_id UUID NOT NULL REFERENCES people (id) ON DELETE CASCADE,
    user_id UUID NOT NULL REFERENCES users (id) ON DELETE CASCADE,
    permission person_permission NOT NULL,
    PRIMARY KEY (person_id, user_id)
);

CREATE INDEX idx_person_shares_user_id ON person_shares (user_id);