src/Leevel/Database/Ddd/Select.php
public function softDestroy(array $ids): int
    {
        $count = 0;

        $instance = $this->entity->make();
        $entitys = $instance
            ->whereIn($instance->singlePrimaryKey(), $ids)
            ->findAll();

        foreach ($entitys as $value) {
            if ($value->softDelete()) {
                $count++;
            }
        }

        return $count;
    }
public function softDestroy(array $ids): int
    {
        $count = 0;

        $instance = $this->entity->make();
        $entitys = $instance
            ->whereIn($instance->singlePrimaryKey(), $ids)
            ->findAll();

        foreach ($entitys as $value) {
            if ($value->softDelete()) {
                $count++;
            }
        }

        return $count;
    }
根据主键 ID 删除模型实体.

@param array $ids
@param mixed $id

@return int