add new fields
This commit is contained in:
@ -20,6 +20,7 @@ use yii\db\Expression;
|
||||
* @property string $created_at
|
||||
* @property string $updated_at
|
||||
* @property string $resume
|
||||
* @property string $salary
|
||||
*
|
||||
* @property array $genders
|
||||
* @property string $gendersText
|
||||
@ -62,6 +63,7 @@ class UserCard extends \yii\db\ActiveRecord
|
||||
[['gender'], 'in', 'range' => array_keys($this->genders)],
|
||||
[['dob', 'created_at', 'updated_at'], 'safe'],
|
||||
[['fio', 'passport', 'photo', 'email', 'resume'], 'string', 'max' => 255],
|
||||
[['salary'], 'string', 'max' => 100],
|
||||
[['status'], 'exist', 'skipOnError' => true, 'targetClass' => Status::class, 'targetAttribute' => ['status' => 'id']],
|
||||
];
|
||||
}
|
||||
@ -83,9 +85,26 @@ class UserCard extends \yii\db\ActiveRecord
|
||||
'created_at' => 'Дата создания',
|
||||
'updated_at' => 'Дата редактирование',
|
||||
'resume' => 'Резюме',
|
||||
'salary' => 'Зарплата',
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \yii\db\ActiveQuery
|
||||
*/
|
||||
public function getFieldsValues()
|
||||
{
|
||||
return $this->hasMany(FieldsValue::class, ['card_id' => 'id']);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \yii\db\ActiveQuery
|
||||
*/
|
||||
public function getProjectUsers()
|
||||
{
|
||||
return $this->hasMany(ProjectUser::class, ['card_id' => 'id']);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \yii\db\ActiveQuery
|
||||
*/
|
||||
|
Reference in New Issue
Block a user