작성자 4명
작성자 1명이 일지 3개 씀.
각 일지에 식단 3개 작성
식단 3개에 대해 음식 2개씩 작성
spring.jpa.hibernate.ddl-auto=create-drop
spring.h2.console.path=/h2-console
spring.datasource.url=jdbc:h2:~/test;
spring.datasource.driverClassName=org.h2.Driver
spring.datasource.username=sa
spring.datasource.password=
spring.jpa.database-platform=org.hibernate.dialect.H2Dialect
POST
RequestBody (각각 따로 전송해야 함.)
{
"name":"me",
"email":"me@naver.com",
"role":"User"
}
{
"name":"other",
"email":"other@naver.com",
"role":"User"
}
{
"name":"another",
"email":"another@naver.com",
"role":"User"
}
{
"name":"someone",
"email":"someone@naver.com",
"role":"User"
}
POST http://localhost:8084/api/diary/diabetes-diary
RequestBody (각각 따로 전송해야 함.)
{
"writerId":1,
"fastingPlasmaGlucose":100,
"remark":"me_1",
"year":"2021",
"month":"12",
"day":"20",
"hour":"00",
"minute":"00",
"second":"00"
}
{
"writerId":1,
"fastingPlasmaGlucose":200,
"remark":"me_2",
"year":"2021",
"month":"12",
"day":"22",
"hour":"00",
"minute":"00",
"second":"00"
}
{
"writerId":1,
"fastingPlasmaGlucose":300,
"remark":"me_3",
"year":"2021",
"month":"12",
"day":"25",
"hour":"00",
"minute":"00",
"second":"00"
}
POST http://localhost:8084/api/diary/diet
Request body
{
"writerId":1,
"diaryId":1,
"eatTime":"BreakFast",
"bloodSugar":100
}
{
"writerId":1,
"diaryId":1,
"eatTime":"Lunch",
"bloodSugar":150
}
{
"writerId":1,
"diaryId":1,
"eatTime":"Dinner",
"bloodSugar":250
}
{
"writerId":1,
"diaryId":2,
"eatTime":"BreakFast",
"bloodSugar":210
}
{
"writerId":1,
"diaryId":2,
"eatTime":"Lunch",
"bloodSugar":270
}
{
"writerId":1,
"diaryId":2,
"eatTime":"Dinner",
"bloodSugar":310
}
{
"writerId":1,
"diaryId":3,
"eatTime":"BreakFast",
"bloodSugar":120
}
{
"writerId":1,
"diaryId":3,
"eatTime":"Dinner",
"bloodSugar":300
}
POST http://localhost:8084/api/diary/food
Request body
{
"writerId":1,
"diaryId":1,
"dietId":1,
"foodName":"food111"
}
{
"writerId":1,
"diaryId":1,
"dietId":1,
"foodName":"food112"
}
{
"writerId":1,
"diaryId":1,
"dietId":2,
"foodName":"food121"
}
{
"writerId":1,
"diaryId":1,
"dietId":2,
"foodName":"food122"
}
{
"writerId":1,
"diaryId":1,
"dietId":3,
"foodName":"food131"
}
{
"writerId":1,
"diaryId":1,
"dietId":3,
"foodName":"food132"
}