Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
n/a
0 / 0
n/a
0 / 0
CRAP
n/a
0 / 0
1<?php
2
3namespace App\Http\Repositories\interfaces;
4
5use App\Http\Models\PromptCompanyNewUpdate;
6use Illuminate\Support\Collection;
7
8/**
9 * Interface for prompt company new update data access operations.
10 *
11 * Abstracts prompt company new update database queries, providing methods
12 * to manage "company news" post options used by post AI features.
13 */
14interface IPromptCompanyNewUpdateRepository
15{
16    /**
17     * Get all prompt company new updates ordered by newest first.
18     *
19     * @return Collection<int, PromptCompanyNewUpdate> Collection of updates
20     */
21    public function getAll(): Collection;
22
23    /**
24     * Find a prompt company new update by its ID.
25     *
26     * @param  string  $id  The update ID
27     * @return PromptCompanyNewUpdate|null The update or null if not found
28     */
29    public function findById(string $id): ?PromptCompanyNewUpdate;
30
31    /**
32     * Create a new prompt company new update.
33     *
34     * @param  array{title: string, prompt: string}  $data  The update data
35     * @return PromptCompanyNewUpdate The created update
36     */
37    public function create(array $data): PromptCompanyNewUpdate;
38
39    /**
40     * Update an existing prompt company new update.
41     *
42     * @param  PromptCompanyNewUpdate  $promptCompanyNewUpdate  The update to modify
43     * @param  array{title?: string, prompt?: string}  $data  The update data
44     * @return PromptCompanyNewUpdate The updated record
45     */
46    public function update(PromptCompanyNewUpdate $promptCompanyNewUpdate, array $data): PromptCompanyNewUpdate;
47
48    /**
49     * Delete a prompt company new update.
50     *
51     * @param  PromptCompanyNewUpdate  $promptCompanyNewUpdate  The update to delete
52     * @return bool True if deleted successfully
53     */
54    public function delete(PromptCompanyNewUpdate $promptCompanyNewUpdate): bool;
55}