where('product_id', '=', $productId)->find(); } /** * 删除 * @param $productId * @return bool */ public static function deleteTimer($productId): bool { return (new static())->where('product_id', '=', $productId)->delete(); } /** * 删除 * @param $taskId * @return bool */ public static function deleteTimerByTaskId($taskId): bool { return (new static())->where('task_id', '=', $taskId)->delete(); } }