You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The single **User Session** currently allowed to access protected OnTime APIs.
17
17
_Avoid_: Current token, latest device
18
18
19
+
**Schedule**:
20
+
A planned appointment or event that a **User** wants OnTime to help them prepare for.
21
+
_Avoid_: Event, calendar item
22
+
23
+
**Preparation**:
24
+
A step a **User** needs to complete before a **Schedule**.
25
+
_Avoid_: Task, checklist item
26
+
27
+
**Alarm Window**:
28
+
A bounded time range where OnTime identifies **Schedules** that need alarm coverage.
29
+
_Avoid_: Notification window, schedule window
30
+
19
31
## Relationships
20
32
21
33
- A **User** has at most one **Active Session**.
22
34
- A **User Session** belongs to exactly one **User**.
35
+
- A **User** owns zero or more **Schedules**.
36
+
- A **Schedule** uses one or more **Preparations** to determine when the **User** should start getting ready.
37
+
- An **Alarm Window** contains zero or more **Schedules** for a single **User**.
23
38
24
39
## Example Dialogue
25
40
26
41
> **Dev:** "If a **User** signs in on a second phone, do both phones keep an **Active Session**?"
27
42
> **Domain expert:** "No. The second sign-in becomes the **Active Session**, and the previous **User Session** is no longer allowed to use protected APIs."
28
43
44
+
> **Dev:** "When the app asks for an **Alarm Window**, should it include the **Preparations** for each **Schedule**?"
45
+
> **Domain expert:** "Yes. The app needs those **Preparations** to calculate when the **User** should start getting ready."
46
+
29
47
## Flagged Ambiguities
30
48
31
49
- "device login" was used to mean both a physical device and an authenticated **User Session**. Resolved: the login limit applies to **User Sessions**, not to registered alarm devices.
`GET /schedules/alarm-window` previously repeated preparation and user-setting reads while mapping each schedule in the response. The optimized path preloads preparation data for the alarm window and avoids fetching the full user graph for each schedule.
./gradlew test --tests devkor.ontime_back.service.ScheduleAlarmWindowQueryCountTest
30
+
```
31
+
32
+
## Notes
33
+
34
+
The HTTP benchmark is intended as local comparative evidence, not a production capacity number. During the H2 load run, asynchronous API log inserts can report H2 identity primary-key collisions after responses have already succeeded; k6 still recorded 0 HTTP failures in both before and after runs.
0 commit comments