return;
}
- if (!$this->db->schema->getTableSchema(self::TABLE_NAME, true)->getColumn('is_marketplace')) {
- $this->addColumn(
- self::TABLE_NAME,
- 'is_marketplace',
- $this->integer()->defaultValue(1)->comment('Метка заказа из маркетплейса'),
- );
- }
if (!$this->db->schema->getTableSchema(self::TABLE_NAME, true)->getColumn('allowed_editing')) {
$this->addColumn(
self::TABLE_NAME,
*/
public function safeDown()
{
- if ($this->db->schema->getTableSchema(self::TABLE_NAME, true)->getColumn('is_marketplace')) {
- $this->dropColumn(self::TABLE_NAME, 'is_marketplace');
- }
if ($this->db->schema->getTableSchema(self::TABLE_NAME, true)->getColumn('allowed_editing')) {
$this->dropColumn(self::TABLE_NAME, 'allowed_editing');
}
* @property int $posit Порядок статусов
* @property int|null $order_status_id Ссылка на статус заказа в МП
* @property int|null $order_substatus_id Ссылка на субстатус заказа в МП
- * @property int $is_marketplace Метка заказа из маркетплейса
* @property int allowed_editing Разрешено редактирование
*/
class MarketplaceOrder1cStatuses extends \yii\db\ActiveRecord
'allowed_closing',
'order_status_id',
'order_substatus_id',
- 'is_marketplace',
'allowed_editing'
], 'integer'],
[['status_instruction', 'status_id'], 'string'],
'posit' => 'Порядок статусов',
'order_status_id' => 'Ссылка на статус заказа в МП',
'order_substatus_id' => 'Ссылка на субстатус заказа в МП',
- 'is_marketplace' => 'Метка заказа из маркетплейса',
'allowed_editing' => 'Разрешено редактирование'
];
}
return $model->allowed_editing === 0 ? 'Нет' : 'Да';
}
],
- [
- 'attribute' => 'is_marketplace',
- 'value' => function ($model) {
- return $model->is_marketplace === 0 ? 'Нет' : 'Да';
- }
- ],
[
'attribute' => 'order_status_id',
'value' => function ($model) {