Actually:
discussions.id is the ID used in the slug and unrelated to Posts. The content of the OP is created from the First Post (discussions.start_post_id).
This explains the use of the last_time and last_user_id ?
This the hide attributes. This happens when you soft delete a discussion (not the post).
number_index is a bit odd. It holds the information of the total amount of posts the discussion ever had. So when a post was deleted, the index will not change, whereas comments_count will.