updated db model: event with included type, and permission tables #51