I have create product attribute of type select select
with below configurations:
$setup->addAttribute(\Magento\Catalog\Model\Product::ENTITY, 'attribute_code', [
'attribute_model' => NULL,
'backend' => '',
'type' => 'int',
'table' => '',
'frontend' => '',
'input' => 'select',
'label' => 'Custom Attribute',
'frontend_class' => '',
'source' => '',
'required' => true,
'user_defined' => '1',
'default' => 0,
'unique' => '0',
'note' => '',
'input_renderer' => NULL,
'global' => '1',
'visible' => '1',
'searchable' => '0',
'filterable' => '1',
'comparable' => '1',
'visible_on_front' => '1',
'is_html_allowed_on_front' => '0',
'is_used_for_price_rules' => '1',
'filterable_in_search' => '1',
'used_in_product_listing' => '0',
'used_for_sort_by' => '0',
'is_configurable' => '1',
'position' => '1',
'wysiwyg_enabled' => '0',
'used_for_promo_rules' => '1',
'option' =>
array(
'values' => $options,
),
]
);
How to set default value of this custom attribute?