Assignment and attachment models with join tables