From: Aleksey Filippov Date: Wed, 21 Aug 2024 08:39:50 +0000 (+0300) Subject: Таблица для данных из 1с Бухгалтерии X-Git-Tag: 1.4~31^2~2 X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=cc7d9e1cd860ae5989aac4de2d598a537f0c3334;p=erp24_rep%2Fyii-erp24%2F.git Таблица для данных из 1с Бухгалтерии --- diff --git a/erp24/migrations/m240820_150742_create_table_motivation_buh.php b/erp24/migrations/m240820_150742_create_table_motivation_buh.php new file mode 100755 index 00000000..acde2699 --- /dev/null +++ b/erp24/migrations/m240820_150742_create_table_motivation_buh.php @@ -0,0 +1,48 @@ +createTable(self::TABLE_NAME, [ + 'id' => $this->primaryKey(), + 'inn' => $this->integer()->notNull()->comment('ИНН фирмы источника данных'), + 'year' => $this->integer()->notNull()->comment('Год'), + 'month' => $this->integer()->notNull()->comment('Месяц'), + 'updated_at' => $this->datetime()->notNull()->comment('Дата изменения записи'), + 'created_at' => $this->datetime()->notNull()->comment('Дата создания записи'), + ]); + + $this->createTable(self::TABLE_NAME2, [ + 'id' => $this->primaryKey(), + 'motivation_buh_id' => $this->integer()->notNull()->comment('id motivation buh'), + 'store_id' => $this->integer()->notNull()->comment('ID магазина'), + 'motivation_group_id' => $this->integer()->notNull()->comment('group id motivation'), + 'value_id' => $this->integer()->notNull()->comment('value id'), + 'value_type' => $this->string(10)->notNull()->comment('тип значения'), + 'value_int' => $this->integer()->null()->comment('value int'), + 'value_float' => $this->float()->null()->comment('value float'), + 'value_string' => $this->string()->null()->comment('value string'), + ]); + } + + /** + * {@inheritdoc} + */ + public function safeDown() + { + $this->dropTable(self::TABLE_NAME2); + $this->dropTable(self::TABLE_NAME); + } +} diff --git a/erp24/records/MotivationBuh.php b/erp24/records/MotivationBuh.php new file mode 100644 index 00000000..d13ba336 --- /dev/null +++ b/erp24/records/MotivationBuh.php @@ -0,0 +1,53 @@ + null], + [['inn', 'year', 'month'], 'integer'], + [['updated_at', 'created_at'], 'safe'], + ]; + } + + /** + * {@inheritdoc} + */ + public function attributeLabels() + { + return [ + 'id' => 'ID', + 'inn' => 'Inn', + 'year' => 'Year', + 'month' => 'Month', + 'updated_at' => 'Updated At', + 'created_at' => 'Created At', + ]; + } +} \ No newline at end of file diff --git a/erp24/records/MotivationBuhValue.php b/erp24/records/MotivationBuhValue.php new file mode 100644 index 00000000..eb4978a4 --- /dev/null +++ b/erp24/records/MotivationBuhValue.php @@ -0,0 +1,62 @@ + null], + [['motivation_buh_id', 'store_id', 'motivation_group_id', 'value_id', 'value_int'], 'integer'], + [['value_float'], 'number'], + [['value_type'], 'string', 'max' => 10], + [['value_string'], 'string', 'max' => 255], + ]; + } + + /** + * {@inheritdoc} + */ + public function attributeLabels() + { + return [ + 'id' => 'ID', + 'motivation_buh_id' => 'Motivation Buh ID', + 'store_id' => 'Store ID', + 'motivation_group_id' => 'Motivation Group ID', + 'value_id' => 'Value ID', + 'value_type' => 'Value Type', + 'value_int' => 'Value Int', + 'value_float' => 'Value Float', + 'value_string' => 'Value String', + ]; + } +} \ No newline at end of file