Open irrationnelle opened 3 years ago
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: '', };
artist
artists
coverImage
당시 회의 때 이야기 나누었던 다음 세 가지 카테고리는 entity 로서 역할한다.
데이터 구조
고려한 점
artist
대신artists
라고 변경할 수 있다.coverImage
는 optional 한 값을 가진다. 먼저 이미지 업로드가 선행 되어야 하며, 이미지를 firebase storage 에 업로드 한 뒤에 firebase storage 가 알려주는 이미지 url 을 저장한다.주의할 점
당시 회의 때 이야기 나누었던 다음 세 가지 카테고리는 entity 로서 역할한다.