# Camy
### Home
#### Main category
```json
[
{
"id" : ID,
"name" : CATEGORY_NAME,
"icon" : CATEGORY_ICON,
"active_training" : ACTIVE_TRAINING
}
]
```
#### Selected training at home
```json
{
"newest_training" : {
"active_count": 10,
"list": [
{
"id": ID,
"title": title,
"slug": slug,
"thumbnails": thumbnails,
"type": type, //training, seminar, webinar, workshop
"is_online": false, // online, offline
"schedule": "dd-mm-yyyy",
"trainer_name": Name,
"price": price,
"promotion": {
"type": "fixed_price", //fixed_price, percentage
"value": VALUE,
"amount": AMOUNT
}
}
]
},
"popular_training" : {
"active_count": 10,
"list": [
{
"id": ID,
"title": title,
"slug": slug,
"thumbnails": thumbnails,
"type": type, //training, seminar, webinar, workshop
"is_online": false, // online, offline
"schedule": "dd-mm-yyyy",
"trainer_name": Name,
"price": price,
"promotion": {
"type": "fixed_price", //fixed_price, percentage
"value": VALUE,
"amount": AMOUNT
}
}
]
},
"popular_webinar" : {
"active_count": 10,
"list": [
{
"id": ID,
"title": title,
"slug": slug,
"thumbnails": thumbnails,
"type": type, //training, seminar, webinar, workshop
"is_online": false, // online, offline
"schedule": "dd-mm-yyyy",
"trainer_name": Name,
"price": price,
"promotion": {
"type": "fixed_price", //fixed_price, percentage
"value": VALUE,
"amount": AMOUNT
}
}
]
}
}
```
### Detail training
```json
{
"id":id,
"slug": slug,
"title": title,
"description": desc,
"cover_image": cover_image,
"thumbnails": thumbnails,
"type": type, //training, seminar, webinar, workshop
"is_online": false, // online, offline
"schedule": "dd-mm-yyyy",
"trainer_name": Name,
"price": price,
"promotion": {
"type": "fixed_price", //fixed_price, percentage
"value": VALUE,
"amount": AMOUNT
},
"status": status, //new, purchased, paid, onprogres, done
"has_review": false, //boolean
"spec_requerement": [
"list","list"
],
"tools":[
{
"title": "figma",
"url": "url"
}
],
"mentors":[
{
"id": id,
"name": name,
"avatar": "avatar",
"slug": slug,
"description": description
}
],
"officer":{
"id": id,
"name": name,
"avatar": "avatar",
"slug": slug,
"description": description
},
"organizer": {
"id": id,
"name": name,
"avatar": "avatar",
"slug": slug,
"description": description
},
"feedbacks": [
]
}
```
#### Training timeline
```json
[
{
"id": id,
"title": timeline_title,
"start_date": start_date,
"end_date": end_date,
"officer_status": onprogres, // waiting, inprogres, done
"user_status": onprogres, // waiting, inprogres, done
"link":{
"type": map, //map, room
"url": url
}
}
]
```
## Table
#### trainings
- id bigint
- title varchar
- slug varchar
- description varchar
- cover_image varchar
- thumbnail varchar
- type tinyinteger
- is_online tinyinteger
- price decimal
- status tinyinteger
#### training_member
- id
- member_type varchar
- member_id bigint
- type integer | officer, trainer, organizer, training_user
- join_date timestamp
## TODO
- Migration
- normal login
- login via google
- passport login
- normal register
- register via google