dduk-ddak / coding-night-live

Web-based Communication Application for Codelabs
Other
62 stars 11 forks source link

poll에서 answer과 answer_count는 중복정보 아닌가요? #37

Closed juice500ml closed 7 years ago

juice500ml commented 7 years ago

제곧내

juice500ml commented 7 years ago

덧붙여서, hash field도 추가하는건 어떤가요?

punkyoon commented 7 years ago
  1. answer

    • ['Yes', 'No']로서, 배열 자료형을 가짐
    • startPoll에서 사용자에게 질문과 답변을 날려줄때 사용
  2. answer_count

    • {'Yes': 0, 'No': 3}으로서, dictionary~JSON 자료형/구조를 가짐
    • result_poll에서 차트를 만들어줄때 사용
    • new_poll에서는 답변 응답수를 0으로 초기화 할 때, end_poll에서는 사용자로부터 받은 응답을 토대로 답변 응답수를 1씩 증가시킬 때 사용
  3. hash_field사용하는거는 좋은 것 같습니다.

juice500ml commented 7 years ago