$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('Автор создания'),
--- /dev/null
+<?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' => 'Автор обновления',
+ ];
+ }
+}