Table
audio_guide_hire
Each hire: ticket, device, language, issuing and returning wing, times and payment.
Replaces in 2020: Hired Audio Guide
Rows 426–450 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 |
|---|---|---|---|---|---|---|---|---|
| 426 | 3610 | D561K998R8427R26 | 1991 | en | 2 | 2017-03-10 12:54:12 | 1 | 2017-03-10 15:16:07 |
| 427 | 3600 | D611Q961Z6085N96 | 1994 | en | 1 | 2017-03-13 09:55:04 | 3 | 2017-03-13 14:18:28 |
| 428 | 3576 | D438U949Y7280M45 | 1997 | en | 2 | 2017-03-15 14:56:03 | 2 | 2017-03-15 17:28:09 |
| 429 | 3630 | D843X661P8223W21 | 2002 | ko | 2 | 2017-03-17 14:56:43 | 1 | 2017-03-17 18:10:00 |
| 430 | 3624 | D948A201L8911R06 | 2017 | en | 2 | 2017-03-25 11:16:21 | 3 | 2017-03-25 13:27:46 |
| 431 | 3691 | D663Z129H2049D24 | 2018 | ko | 1 | 2017-03-25 13:11:47 | 2 | 2017-03-25 15:44:16 |
| 432 | 3614 | D127T102L7940A93 | 2019 | en | 3 | 2017-03-25 15:16:46 | 3 | 2017-03-25 17:33:52 |
| 433 | 3633 | D611Q961Z6085N96 | 2020 | en | 2 | 2017-03-25 15:41:27 | 1 | 2017-03-25 18:10:00 |
| 434 | 3703 | D424A043K7283P36 | 2030 | en | 2 | 2017-03-31 13:29:42 | 2 | 2017-03-31 15:45:05 |
| 435 | 3704 | D072X344L7834Y11 | 2031 | en | 2 | 2017-03-31 13:32:15 | 2 | 2017-03-31 15:51:24 |
| 436 | 3693 | D607F479P4765P37 | 2042 | fr | 1 | 2017-04-05 14:04:11 | 3 | 2017-04-05 15:39:35 |
| 437 | 3741 | D388J554M7671Q58 | 2055 | fr | 3 | 2017-04-11 11:48:26 | 3 | 2017-04-11 14:23:24 |
| 438 | 3743 | D558F571V1033X91 | 2061 | fr | 2 | 2017-04-12 12:12:49 | 1 | 2017-04-12 14:01:37 |
| 439 | 3724 | D500A274G0533N08 | 2064 | es | 2 | 2017-04-13 13:21:08 | 3 | 2017-04-13 16:24:23 |
| 440 | 3749 | D767Q927C0149V09 | 2068 | fr | 2 | 2017-04-14 11:40:10 | 3 | 2017-04-14 13:24:40 |
| 441 | 3720 | D767Q927C0149V09 | 2073 | en | 2 | 2017-04-16 12:17:08 | 2 | 2017-04-16 14:17:19 |
| 442 | 3736 | D831V786T8186E00 | 2079 | en | 2 | 2017-04-18 12:55:58 | 2 | 2017-04-18 14:21:14 |
| 443 | 3740 | D265V521D1968K75 | 2082 | it | 2 | 2017-04-19 14:47:16 | 1 | 2017-04-19 16:54:38 |
| 444 | 3824 | D607F479P4765P37 | 2089 | zh | 3 | 2017-04-22 09:55:47 | 2 | 2017-04-22 11:48:40 |
| 445 | 3715 | D127T102L7940A93 | 2096 | zh | 2 | 2017-04-23 14:04:41 | 3 | 2017-04-23 16:09:20 |
| 446 | 3840 | D172H109Q6717T56 | 2097 | en | 3 | 2017-04-23 14:12:07 | 3 | 2017-04-23 15:54:25 |
| 447 | 3845 | D347R255R5948E69 | 2102 | en | 3 | 2017-04-24 09:28:21 | 3 | 2017-04-24 11:45:30 |
| 448 | 3846 | D080D377C3402T31 | 2103 | fr | 3 | 2017-04-24 09:30:43 | 1 | 2017-04-24 11:22:41 |
| 449 | 3847 | D561K998R8427R26 | 2104 | fr | 3 | 2017-04-24 09:31:16 | 3 | 2017-04-24 10:53:53 |
| 450 | 3863 | D607F479P4765P37 | 2116 | it | 1 | 2017-04-29 09:34:58 | 3 | 2017-04-29 11:58:46 |
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;