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

        $instance = new static();

        foreach ($instance->whereIn($instance->singlePrimaryKey(), $ids)->findAll() as $entity) {
            if ($entity->destroy()->flush()) {
                $count++;
            }
        }

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

        $instance = new static();

        foreach ($instance->whereIn($instance->singlePrimaryKey(), $ids)->findAll() as $entity) {
            if ($entity->destroy()->flush()) {
                $count++;
            }
        }

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

@param array $ids

@return int