Table
audio_guide_hire
Each hire: ticket, device, language, issuing and returning wing, times and payment.
Replaces in 2020: Hired Audio Guide
Rows 526–550 of 1,085
| hire_idINTEGER | ticket_id→ ticket.ticket_id | serial_number→ audio_guide_device.serial_number | order_id→ purchase_order.order_id | language_code→ language.language_code | issued_wing_id→ wing.wing_id | issued_atTEXT | returned_wing_id→ wing.wing_id | returned_atTEXT |
|---|---|---|---|---|---|---|---|---|
| 526 | 4314 | D477K685J7558W94 | 2467 | en | 3 | 2017-08-17 12:58:53 | 1 | 2017-08-17 14:31:59 |
| 527 | 4411 | D080D377C3402T31 | 2479 | en | 2 | 2017-08-20 15:17:04 | 3 | 2017-08-20 16:32:25 |
| 528 | 4471 | D072X344L7834Y11 | 2485 | en | 2 | 2017-08-22 12:16:43 | 1 | 2017-08-22 15:15:39 |
| 529 | 4478 | D130X023V8765P41 | 2488 | zh | 3 | 2017-08-22 16:13:09 | 3 | 2017-08-22 17:20:15 |
| 530 | 4360 | D586V966T0652S73 | 2498 | en | 3 | 2017-08-25 10:26:11 | 1 | 2017-08-25 12:27:41 |
| 531 | 4500 | D607F479P4765P37 | 2507 | en | 2 | 2017-08-27 16:13:46 | 1 | 2017-08-27 17:37:23 |
| 532 | 4499 | D663Z129H2049D24 | 2508 | en | 2 | 2017-08-27 16:23:04 | 3 | 2017-08-27 18:10:00 |
| 533 | 4508 | D388J554M7671Q58 | 2512 | fr | 1 | 2017-08-28 11:56:59 | 2 | 2017-08-28 13:09:08 |
| 534 | 4510 | D413Q817Y7694B71 | 2513 | fr | 1 | 2017-08-28 11:57:46 | 2 | 2017-08-28 13:40:02 |
| 535 | 4526 | D843X661P8223W21 | 2517 | zh | 3 | 2017-08-30 09:59:57 | 2 | 2017-08-30 13:15:37 |
| 536 | 4397 | D191E591F4947H41 | 2521 | en | 2 | 2017-09-01 10:38:20 | 3 | 2017-09-01 12:09:00 |
| 537 | 4484 | D586V966T0652S73 | 2526 | fr | 2 | 2017-09-03 09:48:24 | 2 | 2017-09-03 12:45:00 |
| 538 | 4551 | D324Z884K8486X42 | 2533 | en | 2 | 2017-09-06 13:50:05 | 1 | 2017-09-06 16:21:49 |
| 539 | 4546 | D177W168C4167Y04 | 2534 | en | 1 | 2017-09-06 15:40:35 | 3 | 2017-09-06 17:30:39 |
| 540 | 4559 | D413Q817Y7694B71 | 2538 | en | 2 | 2017-09-07 16:38:31 | 1 | 2017-09-07 18:10:00 |
| 541 | 4564 | D265V521D1968K75 | 2541 | en | 2 | 2017-09-10 11:33:25 | 2 | 2017-09-10 13:02:08 |
| 542 | 4567 | D611Q961Z6085N96 | 2544 | pt | 2 | 2017-09-11 11:03:13 | 1 | 2017-09-11 14:05:04 |
| 543 | 4528 | D347R255R5948E69 | 2550 | en | 2 | 2017-09-13 10:29:05 | 2 | 2017-09-13 12:02:01 |
| 544 | 4529 | D611Q961Z6085N96 | 2551 | en | 2 | 2017-09-13 10:34:17 | 2 | 2017-09-13 13:13:48 |
| 545 | 4580 | D172H109Q6717T56 | 2560 | it | 2 | 2017-09-16 10:18:17 | 2 | 2017-09-16 12:02:04 |
| 546 | 4577 | D948A201L8911R06 | 2561 | it | 2 | 2017-09-16 10:28:37 | 3 | 2017-09-16 12:22:15 |
| 547 | 4579 | D607F479P4765P37 | 2562 | it | 2 | 2017-09-16 10:28:56 | 3 | 2017-09-16 11:59:42 |
| 548 | 4637 | D570K624F8858E76 | 2566 | fr | 1 | 2017-09-17 10:24:42 | 1 | 2017-09-17 11:48:09 |
| 549 | 4660 | D413Q817Y7694B71 | 2578 | fr | 2 | 2017-09-22 15:15:37 | 2 | 2017-09-22 16:50:09 |
| 550 | 4662 | D438U949Y7280M45 | 2581 | en | 2 | 2017-09-24 09:57:20 | 1 | 2017-09-24 12:15:06 |
Table definition
CREATE TABLE audio_guide_hire (
hire_id INTEGER PRIMARY KEY,
ticket_id INTEGER NOT NULL REFERENCES ticket (ticket_id),
serial_number TEXT NOT NULL REFERENCES audio_guide_device (serial_number),
order_id INTEGER NOT NULL UNIQUE REFERENCES purchase_order (order_id),
language_code TEXT NOT NULL REFERENCES language (language_code),
issued_wing_id INTEGER NOT NULL REFERENCES wing (wing_id),
issued_at TEXT NOT NULL,
returned_wing_id INTEGER REFERENCES wing (wing_id),
returned_at TEXT,
CHECK ((returned_at IS NULL) = (returned_wing_id IS NULL)),
CHECK (returned_at IS NULL OR returned_at > issued_at)
) STRICT;