]> gitweb.erp-flowers.ru Git - erp24_rep/yii-erp24/.git/commitdiff
ERP-360 Сборка страницы автопм
authormarina <m.zozirova@gmail.com>
Fri, 6 Jun 2025 09:02:17 +0000 (12:02 +0300)
committermarina <m.zozirova@gmail.com>
Fri, 6 Jun 2025 09:02:17 +0000 (12:02 +0300)
erp24/migrations/m250605_201027_create_autoplannagramma_table.php
erp24/records/Autoplannogramma.php [new file with mode: 0644]

index 34a46167ee66e128c4ebb1a58d9cd35c90dd9b05..64bc54a75e56bdcbc3dd44776a5afd5dce46aaf9 100644 (file)
@@ -15,12 +15,15 @@ class m250605_201027_create_autoplannagramma_table extends Migration
         $this->createTable('{{%autoplannogramma}}', [
             'id' => $this->primaryKey(),
             'week' => $this->integer()->comment('Неделя'),
+            'month' => $this->integer()->comment('Месяц'),
             'year' => $this->integer()->comment('Год'),
             'product_id' => $this->string()->comment('GUID продукта'),
             'store_id' => $this->integer()->comment('ID магазина'),
             'capacity_type' => $this->integer()->comment('Тип планограммы'),
-            'auto_forecast' => $this->boolean()->comment('Прогнозированное значение'),
             'quantity' => $this->integer()->comment('Количество'),
+            'quantity_forecast' => $this->integer()->comment('Количество рассчитанное'),
+            'is_archive' => $this->boolean()->comment('Архивная ли запись?'),
+            'auto_forecast' => $this->boolean()->comment('Значение спрогнозировано?'),
             'created_at' => $this->dateTime()->comment('Дата создания'),
             'updated_at' => $this->dateTime()->comment('Дата обновления'),
             'created_by' => $this->integer()->comment('Автор создания'),
diff --git a/erp24/records/Autoplannogramma.php b/erp24/records/Autoplannogramma.php
new file mode 100644 (file)
index 0000000..008983c
--- /dev/null
@@ -0,0 +1,72 @@
+<?php
+
+namespace yii_app\records;
+
+use Yii;
+
+/**
+ * This is the model class for table "autoplannogramma".
+ *
+ * @property int $id
+ * @property int|null $week Неделя
+ * @property int|null $month Месяц
+ * @property int|null $year Год
+ * @property string|null $product_id GUID продукта
+ * @property int|null $store_id ID магазина
+ * @property int|null $capacity_type Тип планограммы
+ * @property int|null $quantity Количество
+ * @property int|null $quantity_forecast Количество рассчитанное
+ * @property bool|null $is_archive Архивная ли запись?
+ * @property bool|null $auto_forecast Значение спрогнозировано?
+ * @property string|null $created_at Дата создания
+ * @property string|null $updated_at Дата обновления
+ * @property int|null $created_by Автор создания
+ * @property int|null $updated_by Автор обновления
+ */
+class Autoplannogramma extends \yii\db\ActiveRecord
+{
+    /**
+     * {@inheritdoc}
+     */
+    public static function tableName()
+    {
+        return '{{%autoplannogramma}}';
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function rules()
+    {
+        return [
+            [['week', 'month', 'year', 'store_id', 'capacity_type', 'quantity', 'quantity_forecast', 'created_by', 'updated_by'], 'integer'],
+            [['is_archive', 'auto_forecast'], 'boolean'],
+            [['created_at', 'updated_at'], 'safe'],
+            [['product_id'], 'string', 'max' => 255],
+        ];
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function attributeLabels()
+    {
+        return [
+            'id' => 'ID',
+            'week' => 'Неделя',
+            'month' => 'Месяц',
+            'year' => 'Год',
+            'product_id' => 'GUID продукта',
+            'store_id' => 'ID магазина',
+            'capacity_type' => 'Тип планограммы',
+            'quantity' => 'Количество',
+            'quantity_forecast' => 'Количество рассчитанное',
+            'is_archive' => 'Архивная ли запись?',
+            'auto_forecast' => 'Значение спрогнозировано?',
+            'created_at' => 'Дата создания',
+            'updated_at' => 'Дата обновления',
+            'created_by' => 'Автор создания',
+            'updated_by' => 'Автор обновления',
+        ];
+    }
+}