added model relationships and added the schema