using Object.assign for model constructors