add create and update spec for models