45], [['subfolder_name'], 'string', 'max' => 255], [['task_id'], 'exist', 'skipOnError' => true, 'targetClass' => CollectionTasks::class, 'targetAttribute' => ['task_id' => 'id']], ]; } /** * {@inheritdoc} */ public function attributeLabels() { return [ 'id' => '上传记录id', 'task_id' => '收集任务id', 'uploader_ip' => '上传者ip', 'uploaded_at' => '上传时间', 'subfolder_name' => '所在位置', ]; } /** * Gets query for [[Task]]. * * @return \yii\db\ActiveQuery */ public function getTask() { return $this->hasOne(CollectionTasks::class, ['id' => 'task_id']); } }