255], [['description'], 'string', 'max' => 500], [['project_id'], 'exist', 'skipOnError' => true, 'targetClass' => Project::className(), 'targetAttribute' => ['project_id' => 'id']], [['project_user_id'], 'exist', 'skipOnError' => true, 'targetClass' => ProjectUser::className(), 'targetAttribute' => ['project_user_id' => 'id']], [['user_id'], 'exist', 'skipOnError' => true, 'targetClass' => User::className(), 'targetAttribute' => ['user_id' => 'id']], ]; } /** * {@inheritdoc} */ public function attributeLabels() { return [ 'id' => 'ID', 'project_id' => 'Project ID', 'title' => 'Title', 'status' => 'Status', 'created_at' => 'Created At', 'updated_at' => 'Updated At', 'project_user_id' => 'Project User ID', 'user_id' => 'User ID', 'description' => 'Description', ]; } /** * @return \yii\db\ActiveQuery */ public function getProject() { return $this->hasOne(Project::className(), ['id' => 'project_id']); } /** * @return \yii\db\ActiveQuery */ public function getProjectUser() { return $this->hasOne(ProjectUser::className(), ['id' => 'project_user_id']); } /** * @return \yii\db\ActiveQuery */ public function getUser() { return $this->hasOne(User::className(), ['id' => 'user_id']); } /** * @return \yii\db\ActiveQuery */ public function getTaskUsers() { return $this->hasMany(TaskUser::className(), ['task_id' => 'id']); } }