CREATE TABLE IF NOT EXISTS purchases(
    id UUID PRIMARY KEY,

    user_id UUID NOT NULL REFERENCES users(id),
    stripe_id TEXT NOT NULL,
    status TEXT NOT NULL,
    pack_count INT NOT NULL,
    cost_per_pack INT NOT NULL,
    tokens_per_pack INT NOT NULL,
    created_at TIMESTAMPTZ NOT NULL
);

CREATE INDEX idx_token_purchases_user_id ON purchases(user_id);
