Moved table defs to model file