Дипломная работа: Автоматизация контроля качества работы персонала в ИП Мельникова

Внимание! Если размещение файла нарушает Ваши авторские права, то обязательно сообщите нам
92
];
}
/**
* @param FunctionalTester $I
*/
public function loginUser(FunctionalTester $I)
{
$I->amOnPage('/site/login');
$I->fillField('Username', 'erau');
$I->fillField('Password', 'password_0');
$I->click('login-button');
$I->see('Logout (erau)', 'form button[type=submit]');
$I->dontSeeLink('Login');
$I->dontSeeLink('Signup');
}
}
?php
namespace backend\models;
use Yii;
/**
* This is the model class for table "{{%employee}}".
93
*
* @property int $id
* @property int $position_id
* @property string $surname
* @property string $name
* @property string|null $middle_name
* @property string|null $date_birth
* @property int $passport_series
* @property int $passport_number
* @property int $service_record_number
*
* @property CardEfficiency[] $cardEfficiencies
* @property CardEfficiency[] $cardEfficiencies0
* @property Position $position
* @property LogEfficiency[] $logEfficiencies
* @property PaySlip[] $paySlips
* @property ScheduleWorks[] $scheduleWorks
* @property SettlementAccount[] $settlementAccounts
* @property Shift[] $shifts
*/
class Employee extends \yii\db\ActiveRecord
{
94
/**
* {@inheritdoc}
*/
public static function tableName()
{
return '{{%employee}}';
}
/**
* {@inheritdoc}
*/
public function rules()
{
return [
[['position_id', 'surname', 'name', 'passport_series', 'passport_number',
'service_record_number'], 'required'],
[['position_id', 'passport_series', 'passport_number', 'service_record_number'],
'integer'],
[['date_birth'], 'safe'],
[['surname', 'name', 'middle_name'], 'string', 'max' => 255],
[['position_id'], 'exist', 'skipOnError' => true, 'targetClass' =>
Position::className(), 'targetAttribute' => ['position_id' => 'id']],
];
}
95
/**
* {@inheritdoc}
*/
public function attributeLabels()
{
return [
'id' => 'ID',
'position_id' => 'Position ID',
'surname' => 'Surname',
'name' => 'Name',
'middle_name' => 'Middle Name',
'date_birth' => 'Date Birth',
'passport_series' => 'Passport Series',
'passport_number' => 'Passport Number',
'service_record_number' => 'Service Record Number',
];
}
/**
* Gets query for [[CardEfficiencies]].
*
* @return \yii\db\ActiveQuery
96
*/
public function getCardEfficiencies()
{
return $this->hasMany(CardEfficiency::className(), ['employee_id' => 'id']);
}
/**
* Gets query for [[CardEfficiencies0]].
*
* @return \yii\db\ActiveQuery
*/
public function getCardEfficiencies0()
{
return $this->hasMany(CardEfficiency::className(), ['leader_id' => 'id']);
}
/**
* Gets query for [[Position]].
*
* @return \yii\db\ActiveQuery
*/
public function getPosition()
{
Источник: https://baza.diplomsite.ru/previewfile/245