255], [['skype'], 'string', 'max' => 32], [['active_task_ids'], 'string', 'max' => 100], [['login'], 'unique'], [['name'], 'unique'], [['company_id'], 'exist', 'skipOnError' => true, 'targetClass' => Companies::className(), 'targetAttribute' => ['company_id' => 'id']], ]; } /** * {@inheritdoc} */ public function attributeLabels() { return [ 'id' => 'ID', 'name' => 'Name', 'cmdlevel' => 'Cmdlevel', 'phone' => 'Phone', 'password' => 'Password', 'login' => 'Login', 'email' => 'Email', 'skype' => 'Skype', 'company_id' => 'Company ID', 'active_company' => 'Active Company', 'active_device_id' => 'Active Device ID', 'active_task_ids' => 'Active Task Ids', 'created' => 'Created', 'jobtypes' => 'Jobtypes', 'last_seen_mobile' => 'Last Seen Mobile', 'last_seen_web' => 'Last Seen Web', ]; } /** * @return \yii\db\ActiveQuery */ public function getCompany() { return $this->hasOne(Companies::className(), ['id' => 'company_id']); } /** * @return \yii\db\ActiveQuery */ public function getAccountsJobtypes() { return $this->hasMany(AccountsJobtypes::className(), ['account_id' => 'id']); } }