created models with relations, custom pivot model