I am creating a module in the ".install" file, using the following code:
// if not exists, create new content type
if (!node_get_types('type', 'houses')) {
$info = array(
'type' => 'houses',
'name' => t('Houses'),
'module' => 'node',
'description' => t('Manager Houses'),
'locked' => FALSE,
'custom' => TRUE,
);
$info = _node_type_set_defaults($info);
node_type_save((object)$info);
}
It creates a new content type, but how do I create additional fields (e.g. text, nodereference)?