Add models, migrations, tests for applications table and parent tables