一键导入
add-booking
Add one or more bookings to the Smiles of Miles by editing `src/main/resources/import.sql`.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Add one or more bookings to the Smiles of Miles by editing `src/main/resources/import.sql`.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | add-booking |
| description | Add one or more bookings to the Smiles of Miles by editing `src/main/resources/import.sql`. |
Read the current file: Read src/main/resources/import.sql to determine:
booking.idbooking_seq RESTART WITH valuecustomer.id values and namesResolve the customer: Match the customer name from the user's request to an existing customer. If no matching customer exists, ask the user whether to create a new one. If creating a new customer:
customer.id (one above the current max)INSERT INTO customer statement after the existing customer rowsALTER SEQUENCE customer_seq RESTART WITH to the new customer's id + 1Add the booking: Insert a new INSERT INTO booking statement with:
id: next available booking id (one above the current max)customer_id: the id of the matched or newly created customerdateFrom: start date in 'YYYY-MM-DD' formatdateTo: end date in 'YYYY-MM-DD' formatlocation: the rental location as a stringPlace the new booking INSERT grouped with the same customer's other bookings if they exist, otherwise at the end before the ALTER SEQUENCE booking_seq line.
Update the booking sequence: Set ALTER SEQUENCE booking_seq RESTART WITH to the new highest booking id + 1.
User request: "Add a booking for Speedy McWheels in Paris, France from 2026-04-01 to 2026-04-10"
Given that Speedy McWheels is customer id 1 and the current max booking id is 15:
INSERT INTO booking (id, customer_id, dateFrom, dateTo, location)
VALUES (16, 1, '2026-04-01', '2026-04-10', 'Paris, France');
Then update the sequence:
ALTER SEQUENCE booking_seq RESTART WITH 17;
id, firstName, lastNameid, customer_id, dateFrom, dateTo, locationcustomer_seq, booking_seq (RESTART WITH = max id + 1)