Update tables
This commit is contained in:
parent
55d0b8a568
commit
75dc3abaef
@ -10,12 +10,13 @@
|
||||
| :------------ | :--------------- | :-------------------------- |
|
||||
| id | unsigned integer | primary key, auto-increment |
|
||||
| username | varchar | required |
|
||||
| email | varchar | required |
|
||||
| email | varchar | required, unique |
|
||||
| password | varchar | required |
|
||||
| timezone | varchar | |
|
||||
| earliest_time | varchar | |
|
||||
| latest_time | varchar | |
|
||||
| created_at | datetime | generated by database |
|
||||
| updated_at | datetime | generated by database |
|
||||
|
||||
#### Add an account
|
||||
|
||||
@ -193,11 +194,12 @@ A json object for the specified account with an array of `meeting`.
|
||||
| title | varchar | required |
|
||||
| description | varchar | |
|
||||
| start_time | datetime | |
|
||||
| timezone | varchar | |
|
||||
| timezone | varchar | required |
|
||||
| duration | int | required |
|
||||
| status | boolean | required: `0` (proposed) or `1` (confirmed) |
|
||||
| password | varchar | |
|
||||
| created_at | datetime | generated by database |
|
||||
| updated_at | datetime | generated by database |
|
||||
|
||||
#### Add a meeting
|
||||
|
||||
@ -397,71 +399,6 @@ A json object for the specified meeting with an array of `participant`.
|
||||
}
|
||||
```
|
||||
|
||||
### **Possible Dates** | `possible_date`
|
||||
|
||||
| field | data type | metadata |
|
||||
| :------------ | :-------- | :-------------------------- |
|
||||
| id | int | primary key, auto-increment |
|
||||
| meeting_id | varchar | foreign key, required |
|
||||
| possible_date | date | required |
|
||||
|
||||
#### Add a possible date
|
||||
|
||||
**`POST /api/possible-dates`**
|
||||
|
||||
##### Request
|
||||
|
||||
A json object for the meeting to add with **`meeting_id`** and **`possible_date`**.
|
||||
|
||||
```
|
||||
{
|
||||
"meeting_id": "f86983db-955e-43b8-be3e-bc92bbeb9b43",
|
||||
"possible_date": "2020-02-18"
|
||||
}
|
||||
```
|
||||
|
||||
##### Response `201`
|
||||
|
||||
A json object for the added meeting with `id`, `meeting_id` and `possible_date`.
|
||||
|
||||
```
|
||||
{
|
||||
"data": {
|
||||
"id": 5,
|
||||
"meeting_id": "f86983db-955e-43b8-be3e-bc92bbeb9b43",
|
||||
"possible_date": "2020-02-18"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### Delete a possible date
|
||||
|
||||
**`DELETE /api/possible-dates/:id`**
|
||||
|
||||
##### Request
|
||||
|
||||
A json object for the possible date to delete with `id`.
|
||||
|
||||
```
|
||||
{
|
||||
"id": 12
|
||||
}
|
||||
```
|
||||
|
||||
##### Response `200`
|
||||
|
||||
A json object for the deleted possible date with `id`, `meeting_id` and `possible_date`.
|
||||
|
||||
```
|
||||
{
|
||||
"data": {
|
||||
"id": 12,
|
||||
"meeting_id": "f86983db-955e-43b8-be3e-bc92bbeb9b43",
|
||||
"possible_date": "2020-02-18"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### **Participants** | `participant`
|
||||
|
||||
| field | data type | metadata |
|
||||
@ -477,6 +414,7 @@ A json object for the deleted possible date with `id`, `meeting_id` and `possibl
|
||||
| answered | boolean | `0` (no) or `1` (yes) |
|
||||
| timezone | varchar | required |
|
||||
| created_at | datetime | generated by database |
|
||||
| updated_at | datetime | generated by database |
|
||||
|
||||
#### Invite a participant
|
||||
|
||||
@ -589,6 +527,73 @@ A json object for the deleted participant with `participant_username`, `particip
|
||||
}
|
||||
```
|
||||
|
||||
### **Possible Dates** | `possible_date`
|
||||
|
||||
| field | data type | metadata |
|
||||
| :------------ | :-------- | :-------------------------- |
|
||||
| id | int | primary key, auto-increment |
|
||||
| meeting_id | varchar | foreign key, required |
|
||||
| possible_date | date | required |
|
||||
| created_at | datetime | generated by database |
|
||||
| updated_at | datetime | generated by database |
|
||||
|
||||
#### Add a possible date
|
||||
|
||||
**`POST /api/possible-dates`**
|
||||
|
||||
##### Request
|
||||
|
||||
A json object for the meeting to add with **`meeting_id`** and **`possible_date`**.
|
||||
|
||||
```
|
||||
{
|
||||
"meeting_id": "f86983db-955e-43b8-be3e-bc92bbeb9b43",
|
||||
"possible_date": "2020-02-18"
|
||||
}
|
||||
```
|
||||
|
||||
##### Response `201`
|
||||
|
||||
A json object for the added meeting with `id`, `meeting_id` and `possible_date`.
|
||||
|
||||
```
|
||||
{
|
||||
"data": {
|
||||
"id": 5,
|
||||
"meeting_id": "f86983db-955e-43b8-be3e-bc92bbeb9b43",
|
||||
"possible_date": "2020-02-18"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### Delete a possible date
|
||||
|
||||
**`DELETE /api/possible-dates/:id`**
|
||||
|
||||
##### Request
|
||||
|
||||
A json object for the possible date to delete with `id`.
|
||||
|
||||
```
|
||||
{
|
||||
"id": 12
|
||||
}
|
||||
```
|
||||
|
||||
##### Response `200`
|
||||
|
||||
A json object for the deleted possible date with `id`, `meeting_id` and `possible_date`.
|
||||
|
||||
```
|
||||
{
|
||||
"data": {
|
||||
"id": 12,
|
||||
"meeting_id": "f86983db-955e-43b8-be3e-bc92bbeb9b43",
|
||||
"possible_date": "2020-02-18"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### **Availibility** | `availibility`
|
||||
|
||||
| field | data type | metadata |
|
||||
@ -601,6 +606,7 @@ A json object for the deleted participant with `participant_username`, `particip
|
||||
| end_time | timestamp | required |
|
||||
| timezone | varchar | required |
|
||||
| created_at | datetime | generated by database |
|
||||
| updated_at | datetime | generated by database |
|
||||
|
||||
GET / DELETE / UPDATE
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user