問題修改

This commit is contained in:
allen.yan 2025-06-04 15:40:23 +08:00
parent 4edee9bc92
commit 6c002cf831
2 changed files with 11 additions and 12 deletions

View File

@ -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) {

View File

@ -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> */