diff --git a/common/models/UserInfo.php b/common/models/UserInfo.php index 81c4788..f2bcab9 100755 --- a/common/models/UserInfo.php +++ b/common/models/UserInfo.php @@ -63,10 +63,6 @@ return [ [ [ - 'contract', - 'estimate', - 'purchase', - 'delivery', 'is_customer', 'is_freelancer', ], @@ -79,7 +75,6 @@ [ [ 'soft', - 'guarantee', 'about', 'city', 'country', @@ -95,6 +90,7 @@ [ [ 'prepayment' ], 'number', + 'min' => 1, ], [ [ 'experience' ], @@ -117,7 +113,6 @@ ], [ [ - 'salary', 'job', ], 'string', @@ -127,14 +122,23 @@ [ 'busy', 'member', + 'contract', + 'estimate', + 'purchase', + 'delivery', ], 'boolean', ], [ - [ 'view_count', 'busy', 'member' ], + [ 'view_count', 'busy', 'member', 'salary', 'guarantee', 'prepayment' ], 'default', 'value' => 0, ], + [ + ['salary', 'guarantee'], + 'integer', + 'min' => 0, + ], ]; } diff --git a/console/migrations/m160217_092739_currency_table.php b/console/migrations/m160217_092739_currency_table.php new file mode 100644 index 0000000..40657df --- /dev/null +++ b/console/migrations/m160217_092739_currency_table.php @@ -0,0 +1,67 @@ +createTable('{{%currency}}', [ + 'currency_id' => $this->primaryKey(), + 'name' => $this->string(), + 'symbol' => $this->string(), + 'code' => $this->string(3), + 'rate' => $this->float(4), + 'date_update' => $this->timestamp()->defaultExpression('NOW()') + ->notNull(), + 'is_default' => $this->smallInteger(), + ]); + $this->batchInsert('{{%currency}}', [ + 'currency_id', + 'name', + 'symbol', + 'code', + 'rate', + 'is_default', + ], [ + [ + 1, + 'Доллар США', + '$', + 'USD', + 27.31, + 0, + ], + [ + 2, + 'Евро', + '€', + 'EUR', + 30.28, + 0 + ], + [ + 3, + 'Украинская гривна', + '₴', + 'UAH', + 1, + 1, + ], + [ + 4, + 'Российский рубль', + '₽', + 'RUB', + 0.34, + 0, + ], + ]); + } + + public function down() + { + $this->dropTable('{{%currency}}'); + } + } diff --git a/console/migrations/m160217_093704_add_field_geography_user_info.php b/console/migrations/m160217_093704_add_field_geography_user_info.php new file mode 100644 index 0000000..5fba2de --- /dev/null +++ b/console/migrations/m160217_093704_add_field_geography_user_info.php @@ -0,0 +1,16 @@ +addColumn('{{%user_info}}', 'geography', $this->text()); + } + + public function down() + { + $this->dropColumn('{{%user_info}}', 'geography'); + } +} diff --git a/frontend/views/accounts/general.php b/frontend/views/accounts/general.php index d7728c3..b5855d3 100755 --- a/frontend/views/accounts/general.php +++ b/frontend/views/accounts/general.php @@ -117,8 +117,9 @@