Add foreign key constraints to Participants

This commit is contained in:
rui hildt 2020-05-05 11:57:09 +02:00
parent 0c29a59fe3
commit 6ae2f6db17
1 changed files with 33 additions and 36 deletions

View File

@ -368,7 +368,7 @@ A json object for the specified meeting with an array of `possible_date`.
]
```
#### Get a list of complete availibility for a meeting
#### Get a list of all availibility for a meeting
**`GET /api/meetings/:id/availibility`**
@ -423,9 +423,9 @@ A json object for the specified meeting with `meeting_id` and an array of `avail
### **Participants** | `participant`
| field | data type | metadata |
| :------------ | :-------- | :------------------------------ |
| account_id | varchar | required, composite primary key |
| meeting_id | varchar | required, composite primary key |
| :------------ | :-------- | :------------------------------------------- |
| account_id | varchar | required, foreign key, composite primary key |
| meeting_id | varchar | required, foreign key, composite primary key |
| earliest_time | datetime | |
| latest_time | datetime | |
| quorum | boolean | `0` (no) or `1` (yes) |
@ -616,8 +616,6 @@ A json object for the deleted possible date with `id`, `meeting_id` and `possibl
| created_at | datetime | generated by database |
| updated_at | datetime | generated by database |
GET / DELETE / UPDATE
#### Add an availibility for a possible date
**`POST /api/availibility`**
@ -649,11 +647,11 @@ A json object with the availibility to add with **`participant_id`**, **`possibl
##### Response `201`
A json object with the availibility to add with **`participant_id`**, **`possible_date_id`** and an array of intervals with **`id`**, **`preference`**, **`start_time`**, **`end_time`** and **`timezone`**.
A json object with the availibility added with **`id`**, **`participant_id`**, **`possible_date_id`** and an array of intervals with **`id`**, **`preference`**, **`start_time`**, **`end_time`** and **`timezone`**.
```
{
"data": {
"id": 1
"participant_id": 5,
"possible_date_id": 21,
"intervals": [{
@ -672,7 +670,6 @@ A json object with the availibility to add with **`participant_id`**, **`possibl
}
]
}
}
```
#### Delete availibility for a possible date