Skip to content

Commit a16c162

Browse files
committed
prohibit multiple employees on the same run. adjust column order
1 parent e0e9cd3 commit a16c162

File tree

2 files changed

+18
-18
lines changed

2 files changed

+18
-18
lines changed

docs/spec/examples.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -202,19 +202,19 @@ weekend,104,1,work,trip4,station,09:00:00,station,17:00:00
202202
**[`employee_run_dates.txt`](/docs/spec.md#employee_run_datestxt)**
203203

204204
```csv
205-
date,employee_id,service_id,run_id
206-
20240701,A,weekday,101
207-
20240701,B,weekday,102
208-
20240702,A,weekday,101
209-
20240702,B,weekday,102
210-
20240703,A,weekday,101
211-
20240703,B,weekday,102
212-
20240704,C,weekday,101
213-
20240704,D,weekday,102
214-
20240705,C,weekday,101
215-
20240705,D,weekday,102
216-
20240706,C,weekend,103
217-
20240706,D,weekend,104
218-
20240707,A,weekend,103
219-
20240707,B,weekend,104
205+
date,service_id,run_id,employee_id
206+
20240701,weekday,101,A
207+
20240701,weekday,102,B
208+
20240702,weekday,101,A
209+
20240702,weekday,102,B
210+
20240703,weekday,101,A
211+
20240703,weekday,102,B
212+
20240704,weekday,101,C
213+
20240704,weekday,102,D
214+
20240705,weekday,101,C
215+
20240705,weekday,102,D
216+
20240706,weekend,103,C
217+
20240706,weekend,104,D
218+
20240707,weekend,103,A
219+
20240707,weekend,104,B
220220
```

docs/spec/index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,13 +151,13 @@ Run IDs may be non-unique. E.g. E.g. there may be a "Run 100" on both Weekday an
151151

152152
Describes which employees are scheduled to which runs on which dates.
153153

154-
This file should represent the schedule after holidays, vacation, and other scheduled exceptions have been applied.
154+
This file should represent the schedule after holidays, vacations, and other scheduled exceptions have been applied.
155155

156-
Primary Key: `*`
156+
Primary Key: (`date`, `service_id`, `run_id`)
157157

158158
| **Field Name** | **Type** | **Required** | **Description** |
159159
| --- | --- | --- | --- |
160160
| `date` | Date | Required | Service date. |
161-
| `employee_id` | ID | Required | References an agency's external systems. Employee IDs are not used elsewhere in TODS. |
162161
| `service_id` | ID referencing `run_events.txt` | Required | Part of the Run ID, which is refered to as `(service_id, run_id)`. See [Run ID Uniqueness](#run-id-uniqueness). |
163162
| `run_id` | ID referencing `run_events.txt` | Required | The run that's added to this employee's schedule. |
163+
| `employee_id` | ID | Required | References an agency's external systems. Employee IDs are not used elsewhere in TODS. |

0 commit comments

Comments
 (0)