create model and define relationship