From: Alexander Smirnov Date: Sat, 22 Feb 2025 19:31:12 +0000 (+0300) Subject: [ERP-325] amo_status to marketplace_status X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=0d31162c0f89ee5b99e9c2a4bce50bf05407c9b9;p=erp24_rep%2Fyii-erp24%2F.git [ERP-325] amo_status to marketplace_status --- diff --git a/erp24/api2/controllers/MarketplaceController.php b/erp24/api2/controllers/MarketplaceController.php index 3436c460..11773d84 100644 --- a/erp24/api2/controllers/MarketplaceController.php +++ b/erp24/api2/controllers/MarketplaceController.php @@ -2,12 +2,12 @@ namespace app\controllers; -use yii_app\records\AmoStatus; +use yii_app\records\MarketplaceStatus; class MarketplaceController extends BaseController { public function actionStatuses() { $this->response->format = \yii\web\Response::FORMAT_JSON; - return ['response' => AmoStatus::find()->asArray()->all()]; + return ['response' => MarketplaceStatus::find()->asArray()->all()]; } } \ No newline at end of file diff --git a/erp24/migrations/m250221_131205_create_table_amo_status.php b/erp24/migrations/m250221_131205_create_table_amo_status.php deleted file mode 100755 index 5a9be433..00000000 --- a/erp24/migrations/m250221_131205_create_table_amo_status.php +++ /dev/null @@ -1,55 +0,0 @@ -createTable(self::TABLE_NAME, [ - 'id' => $this->primaryKey(), - 'alias' => $this->string(100)->notNull()->comment('alias статуса'), - 'name' => $this->string(100)->notNull()->comment('наименование статуса на русском'), - ]); - - $this->batchInsert(self::TABLE_NAME, ['id', 'alias', 'name'], [ - [1, 'new', 'Новая сделка'], - [2, 'in_work', 'Взято в работу'], - [3, 'agree', 'Согласован'], - [4, 'not_contacted', 'Связывались более 2 раз'], - [5, 'client_identity', 'Клиент идентифицирован'], - [6, 'to_florist', 'Передано флористу'], - [7, 'photo_send', 'Фото отправлено, ожидание подтверждения клиента'], - [8, 'florist_edit', 'Правки флориста'], - [9, 'self_delivery', 'Передано на самовывоз'], - [10, 'verify_select_courier', 'Согласован, выбор курьера'], - [11, 'select_courier', 'Выбор курьера'], - [12, 'delivery', 'Заказ передан курьеру'], - [13, 'success', 'Успешно'], - [14, 'close_dont_buy', 'Закрыто и не реализовано'], - // *** - [15, 'to_delivery', 'на доставку'], - [16, 'assembled', 'собран'], - [17, 'agreement_with_client', 'согласование с клиентом'], - [18, 'refuse', 'отказ'], - [19, 'delivered', 'доставлено'], - [20, 'customer_return_refusal_after_delivery', 'возврат от клиента, отказ после доставки'] - ]); - } - - /** - * {@inheritdoc} - */ - public function safeDown() - { - $this->dropTable(self::TABLE_NAME); - } -} diff --git a/erp24/migrations/m250221_131205_create_table_marketplace_status.php b/erp24/migrations/m250221_131205_create_table_marketplace_status.php new file mode 100755 index 00000000..83bd9bb2 --- /dev/null +++ b/erp24/migrations/m250221_131205_create_table_marketplace_status.php @@ -0,0 +1,55 @@ +createTable(self::TABLE_NAME, [ + 'id' => $this->primaryKey(), + 'alias' => $this->string(100)->notNull()->comment('alias статуса'), + 'name' => $this->string(100)->notNull()->comment('наименование статуса на русском'), + ]); + + $this->batchInsert(self::TABLE_NAME, ['id', 'alias', 'name'], [ + [1, 'new', 'Новая сделка'], + [2, 'in_work', 'Взято в работу'], + [3, 'agree', 'Согласован'], + [4, 'not_contacted', 'Связывались более 2 раз'], + [5, 'client_identity', 'Клиент идентифицирован'], + [6, 'to_florist', 'Передано флористу'], + [7, 'photo_send', 'Фото отправлено, ожидание подтверждения клиента'], + [8, 'florist_edit', 'Правки флориста'], + [9, 'self_delivery', 'Передано на самовывоз'], + [10, 'verify_select_courier', 'Согласован, выбор курьера'], + [11, 'select_courier', 'Выбор курьера'], + [12, 'delivery', 'Заказ передан курьеру'], + [13, 'success', 'Успешно'], + [14, 'close_dont_buy', 'Закрыто и не реализовано'], + // *** + [15, 'to_delivery', 'на доставку'], + [16, 'assembled', 'собран'], + [17, 'agreement_with_client', 'согласование с клиентом'], + [18, 'refuse', 'отказ'], + [19, 'delivered', 'доставлено'], + [20, 'customer_return_refusal_after_delivery', 'возврат от клиента, отказ после доставки'] + ]); + } + + /** + * {@inheritdoc} + */ + public function safeDown() + { + $this->dropTable(self::TABLE_NAME); + } +} diff --git a/erp24/records/AmoStatus.php b/erp24/records/AmoStatus.php deleted file mode 100644 index 37219a75..00000000 --- a/erp24/records/AmoStatus.php +++ /dev/null @@ -1,46 +0,0 @@ - 100], - ]; - } - - /** - * {@inheritdoc} - */ - public function attributeLabels() - { - return [ - 'id' => 'ID', - 'alias' => 'Alias', - 'name' => 'Name', - ]; - } -} diff --git a/erp24/records/MarketplaceStatus.php b/erp24/records/MarketplaceStatus.php new file mode 100644 index 00000000..9eb98559 --- /dev/null +++ b/erp24/records/MarketplaceStatus.php @@ -0,0 +1,46 @@ + 100], + ]; + } + + /** + * {@inheritdoc} + */ + public function attributeLabels() + { + return [ + 'id' => 'ID', + 'alias' => 'Alias', + 'name' => 'Name', + ]; + } +}