added dependencies between models
added dependency to line_items and also method for checking reference of line_items