2022-11-03 17:46:36 +03:00
|
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace common\models;
|
|
|
|
|
|
|
|
|
|
use Exception;
|
|
|
|
|
use yii\behaviors\TimestampBehavior;
|
|
|
|
|
use yii\db\Expression;
|
|
|
|
|
use yii\helpers\ArrayHelper;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* This is the model class for table "resume_template".
|
|
|
|
|
*
|
|
|
|
|
* @property int $id
|
|
|
|
|
* @property string $title
|
|
|
|
|
* @property string $created_at
|
|
|
|
|
* @property string $updated_at
|
|
|
|
|
* @property int $status
|
|
|
|
|
* @property string $template_body
|
2022-11-14 13:48:31 +03:00
|
|
|
|
* @property string $header_text
|
|
|
|
|
* @property string $header_image
|
2022-11-21 13:54:58 +03:00
|
|
|
|
* @property string $footer_text
|
|
|
|
|
* @property string $footer_image
|
2022-11-03 17:46:36 +03:00
|
|
|
|
*/
|
|
|
|
|
class ResumeTemplate extends \yii\db\ActiveRecord
|
|
|
|
|
{
|
|
|
|
|
public static $fieldNamesAndSignature = [
|
|
|
|
|
'ФИО' => '${fio}',
|
|
|
|
|
'Паспорт' => '${passport}',
|
|
|
|
|
'Электронная почта' => '${email}',
|
|
|
|
|
'Пол' => '${gender}',
|
|
|
|
|
'Резюме' => '${resume}',
|
|
|
|
|
'Зароботная плата' => '${salary}',
|
2022-11-17 12:40:22 +03:00
|
|
|
|
'Ставка для резюме' => '${resume_tariff}',
|
2022-11-03 17:46:36 +03:00
|
|
|
|
'Позиция' => '${position_id}',
|
|
|
|
|
'Город' => '${city}',
|
|
|
|
|
'Ссылка ВК' => '${link_vk}',
|
|
|
|
|
'Ссылка Телграм' => '${link_telegram}',
|
|
|
|
|
'Резюме текст' => '${vc_text}',
|
|
|
|
|
'Уровень' => '${level}',
|
|
|
|
|
'Резюме короткий текст' => '${vc_text_short}',
|
|
|
|
|
'Лет опыта' => '${years_of_exp}',
|
|
|
|
|
'Спецификация' => '${specification}',
|
|
|
|
|
'Навыки' => '${skills}'
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
public static $fieldSignatureDbName = [
|
|
|
|
|
'${fio}'=> 'fio',
|
|
|
|
|
'${passport}'=> 'passport',
|
|
|
|
|
'${email}' => 'email',
|
|
|
|
|
'${gender}'=> 'gender',
|
|
|
|
|
'${resume}'=> 'resume',
|
|
|
|
|
'${salary}' => 'salary',
|
2022-11-17 12:40:22 +03:00
|
|
|
|
'${resume_tariff}' => 'resume_tariff',
|
2022-11-03 17:46:36 +03:00
|
|
|
|
'${position_id}'=> 'position_id',
|
|
|
|
|
'${city}'=> 'city',
|
|
|
|
|
'${link_vk}' => 'link_vk',
|
|
|
|
|
'${link_telegram}' => 'link_telegram',
|
|
|
|
|
'${vc_text}' => 'vc_text',
|
|
|
|
|
'${level}'=> 'level',
|
|
|
|
|
'${vc_text_short}' => 'vc_text_short',
|
|
|
|
|
'${years_of_exp}' => 'years_of_exp',
|
|
|
|
|
'${specification}'=> 'specification',
|
|
|
|
|
'${skills}'=>'skills'
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* {@inheritdoc}
|
|
|
|
|
*/
|
|
|
|
|
public static function tableName()
|
|
|
|
|
{
|
|
|
|
|
return 'resume_template';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function behaviors()
|
|
|
|
|
{
|
|
|
|
|
return [
|
|
|
|
|
[
|
|
|
|
|
'class' => TimestampBehavior::class,
|
|
|
|
|
'createdAtAttribute' => 'created_at',
|
|
|
|
|
'updatedAtAttribute' => 'updated_at',
|
|
|
|
|
'value' => new Expression('NOW()'),
|
|
|
|
|
],
|
|
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* {@inheritdoc}
|
|
|
|
|
*/
|
|
|
|
|
public function rules()
|
|
|
|
|
{
|
|
|
|
|
return [
|
|
|
|
|
[['title', 'status'], 'required'],
|
|
|
|
|
[['created_at', 'updated_at'], 'safe'],
|
|
|
|
|
[['status'], 'integer'],
|
|
|
|
|
[['template_body'], 'string'],
|
2022-11-21 13:54:58 +03:00
|
|
|
|
[['title', 'header_text', 'header_image', 'footer_text', 'footer_image'], 'string', 'max' => 255],
|
2022-11-03 17:46:36 +03:00
|
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* {@inheritdoc}
|
|
|
|
|
*/
|
|
|
|
|
public function attributeLabels()
|
|
|
|
|
{
|
|
|
|
|
return [
|
|
|
|
|
'id' => 'ID',
|
|
|
|
|
'title' => 'Название',
|
|
|
|
|
'created_at' => 'Created At',
|
|
|
|
|
'updated_at' => 'Updated At',
|
|
|
|
|
'status' => 'Статус',
|
2022-11-17 12:40:22 +03:00
|
|
|
|
'template_body' => 'Тело шаблона',
|
2022-11-14 13:48:31 +03:00
|
|
|
|
'header_text' => 'Текст в верхнем контикуле',
|
|
|
|
|
'header_image' => 'Картинка в верхнем контикуле',
|
2022-11-21 13:54:58 +03:00
|
|
|
|
'footer_text' => 'Текст в нижнем контикуле',
|
|
|
|
|
'footer_image' => 'Картинка в нижнем контикуле',
|
2022-11-03 17:46:36 +03:00
|
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
}
|