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']],
];
}