diff --git a/backend/modules/card/views/user-card/_form.php b/backend/modules/card/views/user-card/_form.php
index e05d94e..dca2ae2 100755
--- a/backend/modules/card/views/user-card/_form.php
+++ b/backend/modules/card/views/user-card/_form.php
@@ -70,6 +70,12 @@ use yii\widgets\ActiveForm;
= $form->field($model, 'city')->textInput(['maxlength' => true]) ?>
+
+ = $form->field($model, 'link_vk')->textInput(['maxlength' => true]) ?>
+
+
+ = $form->field($model, 'link_telegram')->textInput(['maxlength' => true]) ?>
+
diff --git a/backend/modules/card/views/user-card/view.php b/backend/modules/card/views/user-card/view.php
index 7b2765e..12db879 100755
--- a/backend/modules/card/views/user-card/view.php
+++ b/backend/modules/card/views/user-card/view.php
@@ -53,6 +53,10 @@ $this->params['breadcrumbs'][] = $this->title;
'email:email',
+ 'link_vk:url',
+
+ 'link_telegram:url',
+
'dob',
[
'attribute' => 'status',
diff --git a/common/models/UserCard.php b/common/models/UserCard.php
index 1cde826..0b38d71 100755
--- a/common/models/UserCard.php
+++ b/common/models/UserCard.php
@@ -68,7 +68,7 @@ class UserCard extends \yii\db\ActiveRecord
[['fio', 'status', 'gender', 'email'], 'required'],
[['gender', 'status', 'position_id', 'id_user'], 'integer'],
[['dob', 'created_at', 'updated_at', 'deleted_at'], 'safe'],
- [['fio', 'passport', 'photo', 'email', 'resume', 'city'], 'string', 'max' => 255],
+ [['fio', 'passport', 'photo', 'email', 'resume', 'city', 'link_vk', 'link_telegram'], 'string', 'max' => 255],
[['salary'], 'string', 'max' => 100],
[['position_id'], 'exist', 'skipOnError' => true, 'targetClass' => Position::class, 'targetAttribute' => ['position_id' => 'id']],
[['status'], 'exist', 'skipOnError' => true, 'targetClass' => Status::class, 'targetAttribute' => ['status' => 'id']],
@@ -97,6 +97,8 @@ class UserCard extends \yii\db\ActiveRecord
'salary' => 'Зарплата',
'position_id' => 'Должность',
'city' => 'Город',
+ 'link_vk' => 'VK',
+ 'link_telegram' => 'Telegram',
];
}
diff --git a/console/migrations/m200805_113316_add_columns_links_to_user_card_table.php b/console/migrations/m200805_113316_add_columns_links_to_user_card_table.php
new file mode 100644
index 0000000..6a0367f
--- /dev/null
+++ b/console/migrations/m200805_113316_add_columns_links_to_user_card_table.php
@@ -0,0 +1,27 @@
+addColumn('user_card', 'link_vk', $this->string(255));
+ $this->addColumn('user_card', 'link_telegram', $this->string(255));
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function safeDown()
+ {
+ $this->dropColumn('user_card', 'link_vk');
+ $this->dropColumn('user_card', 'link_telegram');
+ }
+}