-- +goose Up
-- +goose StatementBegin
CREATE TABLE users (
    id UUID PRIMARY KEY DEFAULT gen_random_uuid(),   -- Unique identifier
    email TEXT UNIQUE NOT NULL,                      -- Unique user email
    full_name TEXT NOT NULL,                         -- User's full name
    password_hash TEXT NOT NULL,                     -- Hashed password (e.g., bcrypt)
    is_admin BOOLEAN NOT NULL DEFAULT FALSE,         -- Superuser/admin flag
    created_at TIMESTAMPTZ DEFAULT now(),            -- Timestamp of creation
    updated_at TIMESTAMPTZ DEFAULT now(),            -- Timestamp of last update
    last_login TIMESTAMPTZ                           -- Optional: for login auditing
);
-- +goose StatementEnd

-- +goose Down
-- +goose StatementBegin
DROP TABLE users;
-- +goose StatementEnd
