From: fomichev Date: Tue, 4 Feb 2025 15:15:04 +0000 (+0300) Subject: Добавление поля check_id_last_sale в Users X-Git-Tag: 1.7~16^2~4 X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=aeee3a361c8f3483472a8efb8ad4faa4400310e7;p=erp24_rep%2Fyii-erp24%2F.git Добавление поля check_id_last_sale в Users --- diff --git a/erp24/records/Users.php b/erp24/records/Users.php index 797b4f59..a3034094 100755 --- a/erp24/records/Users.php +++ b/erp24/records/Users.php @@ -68,6 +68,7 @@ use yii\helpers\BaseConsole; * @property string|null $first_minus_balance * @property string $info * @property string|null $bonus_level Уровань клиента в БС + * @property string|null $check_id_last_sale GUID последнего чека */ class Users extends \yii\db\ActiveRecord { @@ -184,10 +185,11 @@ class Users extends \yii\db\ActiveRecord 'first_minus_balance', 'telegram_unsubscribed_at', 'bonus_level', + 'check_id_last_sale', ], 'safe' ], - [['pol', 'info', 'telegram_created_at'], 'string'], + [['pol', 'check_id_last_sale', 'info', 'telegram_created_at'], 'string'], [ [ 'forgot', @@ -287,7 +289,8 @@ class Users extends \yii\db\ActiveRecord 'black_list' => 'Black List', 'events' => 'Events', 'telegram_unsubscribed_at' => 'Telegram Unsubscribed At', - 'bonus_level' => 'Bonus Level' + 'bonus_level' => 'Bonus Level', + 'check_id_last_sale' => 'GUID Last Check' ]; } diff --git a/erp24/records/UsersBonusLevels.php b/erp24/records/UsersBonusLevels.php index 00dad293..6b307391 100644 --- a/erp24/records/UsersBonusLevels.php +++ b/erp24/records/UsersBonusLevels.php @@ -12,6 +12,8 @@ use Yii; * @property int $user_id ID клиента * @property string $bonus_level Уровань клиента в БС * @property string $created_at Дата создания + * @property string|null $check_id Дата создания + * @property string|null $check_name Дата создания * @property int $active Активность записи * @property string|null $updated_at Дата изменения */ @@ -34,8 +36,8 @@ class UsersBonusLevels extends \yii\db\ActiveRecord [['phone', 'user_id', 'bonus_level'], 'required'], [['user_id', 'active'], 'default', 'value' => null], [['user_id', 'active'], 'integer'], - [['created_at', 'updated_at'], 'safe'], - [['phone', 'bonus_level'], 'string', 'max' => 255], + [['check_id', 'check_name', 'created_at', 'updated_at'], 'safe'], + [['check_id', 'check_name', 'phone', 'bonus_level'], 'string', 'max' => 255], ]; } @@ -52,6 +54,8 @@ class UsersBonusLevels extends \yii\db\ActiveRecord 'created_at' => 'Дата создания', 'active' => 'Активность записи', 'updated_at' => 'Дата изменения', + 'check_id' => 'Основание для повышения уровня - GUID', + 'check_name' => 'Основание для повышения уровня - номер чека', ]; } }