diff --git a/app/Http/Controllers/BranchControlController.php b/app/Http/Controllers/BranchControlController.php index 59ced23..96a8469 100644 --- a/app/Http/Controllers/BranchControlController.php +++ b/app/Http/Controllers/BranchControlController.php @@ -6,7 +6,6 @@ use Illuminate\Http\Request; use Illuminate\Http\JsonResponse; use Illuminate\Support\Facades\Auth; use App\Models\Branch; -use App\Models\Room; use App\Enums\RoomType; use App\Enums\RoomStatus; use App\Http\Responses\ApiResponse; @@ -58,7 +57,16 @@ class BranchControlController extends Controller * ), * ) */ - + /** + * @OA\Schema( + * schema="RoomInfo", + * type="object", + * @OA\Property(property="is_online", type="boolean", example=true), + * @OA\Property(property="status", ref="#/components/schemas/RoomStatus"), + * @OA\Property(property="started_at", type="string", format="date-time", example="2025-06-04T10:00:00Z"), + * @OA\Property(property="ended_at", type="string", format="date-time", example="2025-06-04T12:00:00Z") + * ) + */ public function Branches(Request $request): JsonResponse { $branches = Branch::with('rooms')->get()->map(function ($branch) { diff --git a/app/Models/Room.php b/app/Models/Room.php index 09094ab..7a09922 100644 --- a/app/Models/Room.php +++ b/app/Models/Room.php @@ -21,16 +21,7 @@ use App\Traits\LogsModelActivity; * @OA\Property(property="ended_at", type="string", format="date-time", example=null), * ) */ -/** - * @OA\Schema( - * schema="RoomInfo", - * type="object", - * @OA\Property(property="is_online", type="boolean", example=true), - * @OA\Property(property="status", ref="#/components/schemas/RoomStatus"), - * @OA\Property(property="started_at", type="string", format="date-time", example="2025-06-04T10:00:00Z"), - * @OA\Property(property="ended_at", type="string", format="date-time", example="2025-06-04T12:00:00Z") - * ) - */ + class Room extends Model { /** @use HasFactory<\Database\Factories\ArtistFactory> */