Model and associations for terms