Skip to content

Commit 6447774

Browse files
committed
fix: Update training session schema and HTTP verb ordering
1 parent d2dc3ca commit 6447774

File tree

2 files changed

+138
-386
lines changed

2 files changed

+138
-386
lines changed
Lines changed: 50 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,70 @@
1-
#the participant of the training session
21
type: object
2+
required:
3+
- training_id
4+
- session_date
5+
- location
6+
- trainer_id
7+
- max_participants
38
properties:
49
id:
510
type: string
611
format: cuid
712
readOnly: true
8-
description: "The unique Id of the participant."
9-
first_name:
13+
description: "The unique ID of the training session"
14+
example: "clh1234567890abcdef"
15+
training_id:
1016
type: string
11-
description: "first name of the participant"
12-
last_name:
17+
format: cuid
18+
description: "The ID of the training this session belongs to"
19+
example: "clh1234567890abcdef"
20+
session_date:
1321
type: string
14-
description: "last name of the participant"
15-
email:
22+
format: date
23+
description: "The date of the training session"
24+
example: "2024-01-15"
25+
start_time:
1626
type: string
17-
description: "email of the participant"
18-
19-
signature:
27+
pattern: "^([0-1][0-9]|2[0-3]):[0-5][0-9]$"
28+
description: "Start time of the session (24-hour format)"
29+
example: "09:00"
30+
end_time:
2031
type: string
21-
description: "To hold the digital the signature of the participant"
22-
role:
32+
pattern: "^([0-1][0-9]|2[0-3]):[0-5][0-9]$"
33+
description: "End time of the session (24-hour format)"
34+
example: "17:00"
35+
location:
2336
type: string
24-
description: To Specify the role of the participant
25-
example: "Farmer, Trainer"
26-
training_id:
37+
description: "Location where the session will be held"
38+
example: "Community Center"
39+
trainer_id:
2740
type: string
2841
format: cuid
29-
description: the company id of the training
30-
example: 1jssbbjsbjsbjs221878dd817dd87sd
31-
phone:
32-
type: string
33-
description: To Specify the phone number of the participant
34-
training_picture_urls:
42+
description: "The ID of the trainer conducting the session"
43+
example: "clh1234567890abcdef"
44+
max_participants:
45+
type: integer
46+
minimum: 1
47+
description: "Maximum number of participants allowed"
48+
example: 30
49+
current_participants:
50+
type: integer
51+
minimum: 0
52+
description: "Current number of participants registered"
53+
example: 25
54+
status:
3555
type: string
36-
format: array
37-
description: the images of the training
38-
example: ["https://senima.com/wp-content/uploads/2022/01/gold.png"]
39-
report_url:
40-
type: string
41-
description: To specify the report of the training
42-
example: "https://senima.com/wp-content/uploads/2022/01/report.pdf"
43-
trainer_proof_of_competency:
44-
type: string
45-
format: array
46-
description: the training proof of competency of the trainer.
56+
enum: ["scheduled", "in-progress", "completed", "cancelled"]
57+
description: "Current status of the session"
58+
example: "scheduled"
4759
created_at:
4860
type: string
4961
format: date-time
50-
example: "2020-01-01T00:00:00Z"
51-
description: "the date and time when the participant was created"
62+
readOnly: true
63+
description: "When the session was created"
64+
example: "2024-01-15T10:30:00Z"
5265
updated_at:
5366
type: string
5467
format: date-time
55-
example: "2020-01-01T00:00:00Z"
56-
description: "the date and time when the participant was updated"
68+
readOnly: true
69+
description: "When the session was last updated"
70+
example: "2024-01-15T10:30:00Z"

0 commit comments

Comments
 (0)