Define model before collection.