現在、予約サイトを運営しています。PHP Baikal CalDav サーバーを使用しています (変更済み)。バイカルによって生成された ical ファイルは、Mozilla Thunderbird または iCal を介して生成された場合、VCALENDAR (各イベント) ファイルを mysql の中程度の blob として単一の列に格納します。さらに、私のサイトでの予約も VCALENDAR ファイルとして保存されます。
部屋が空いているかどうかを確認したい場合は、room_id に一致するすべての VCALENDAR ファイルを取得し、VCALENDAR から情報を抽出する必要があります。この操作にコストがかかりすぎるかどうかはわかりません。VCALENDARS からデータベースを「クリーン」しようとしましたが、既に使用されており、再発していません。
I have to open the room_id opening hours VCALENDAR -> extract data with Sabre process
For Loop through Exception VCALENDAR -> extract data with Sabre process
For Loop through Baikal VCALENDAR -> extract data with Sabre process
For Loop through Bookings VCALENDAR -> extract data with Sabre process
-> Process All -> Return Result, if room is free in the given time.
icsファイル(営業時間、例外、予約、バイカル予約)があるときに、特定のタイムスロットで部屋の空室状況をチェックするスマートアルゴリズムはありますか?
ありがとう!