/**
* set the target be not have a file
*
* @param string $fileableId fileable identifier
* @param File $file file instance
* @param bool $remove remove file when given true
* @return void
*/
public function unBind($fileableId, File $file, $remove = false)
{
$file->getConnection()->table($file->getFileableTable())->where('fileId', $file->getKey())->where('fileableId', $fileableId)->delete();
$file->useCount--;
if ($remove === true && $file->useCount < 1) {
$this->remove($file);
} else {
$file->save();
}
}