Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

공연 데이터 json 구조 #15

Open
irrationnelle opened this issue Jul 6, 2021 · 0 comments
Open

공연 데이터 json 구조 #15

irrationnelle opened this issue Jul 6, 2021 · 0 comments
Labels
documentation Improvements or additions to documentation

Comments

@irrationnelle
Copy link
Owner

irrationnelle commented Jul 6, 2021

데이터 구조

interface ConcertProperty {
  title: string;
  artist: {id: number; name: string;}[];
  stage: string;
  address: string;
  genre: string;
  date: Timestamp;
  coverImage?: string;
}

const EXAMPLE_DATA: ConcertProperty = {
  title: '대환장파티',
  artist: [{ id: 1, name: '라니아' }, { id: 8, name: '자우림' }],
  stage: '롤링홀',
  address: '서울 마포구 어울마당로 35',
  genre: 'rockmetal',
  date: Timestamp.fromDate(new Date('2012-11-19T22:30:00')),
  coverImage: '',
};

고려한 점

  • 아티스트 이름이 동일한 경우가 있을 수 있다 -> 아티스트를 entity 로 다룬다. 아티스트는 이름이 동일하고 장르가 같아도 식별자가 다르면 다른 것이다.
  • 아티스트가 여러명일 수 있다. 따라서 artist 는 배열 타입을 가진다. 상황에 따라서 이름을 artist 대신 artists 라고 변경할 수 있다.
  • 공연장 역시 이름이 동일할 수 있다. 공연장 또한 entity 로 다룬다.
  • 주소 정보는 우편번호 검색 API 를 사용한다.
  • 날짜 타입은 현재는 firebase 의 Timestamp 을 가지고 있다. 하지만 타입 정보가 firebase 에 의존하는 형태이기 때문에 독자적인 타입 정보를 가지도록 한다. 또한 UI 라이브러리의 timepicker 등을 이용할 수 있도록 한다.
  • coverImage 는 optional 한 값을 가진다. 먼저 이미지 업로드가 선행 되어야 하며, 이미지를 firebase storage 에 업로드 한 뒤에 firebase storage 가 알려주는 이미지 url 을 저장한다.

주의할 점

당시 회의 때 이야기 나누었던 다음 세 가지 카테고리는 entity 로서 역할한다.

  • 아티스트
  • 공연장
  • 공연
@irrationnelle irrationnelle added the documentation Improvements or additions to documentation label Jul 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant