Nexters / TickTock-android

NEXTERS 14th - TickTock
6 stars 2 forks source link

DB 구축 #1

Open shouwn opened 5 years ago

shouwn commented 5 years ago
shouwn commented 5 years ago

articles

column 설명
id pk
title 제목
start_time 출발 시간
days 요일들

steps

column 설명
id pk
time 소요 시간
name 스탭 이름
article_id articles_fk

destinations

column 설명
article_id article id 를 pk로 사용
time 소요 시간
destination_name 목적지명

ORMLite 에서 위와 같은 db 구조를 지원하는지 모르겠어서 아래와 같이 수정

column 설명
id pk
time 소요 시간
destination_name 목적지명
article_id articles_fk

step_reports

column 설명
id pk
time 소요 시간
report_time 리포팅된 날짜
step_id step_fk
shouwn commented 5 years ago

현재 시각 관련 클래스로 Date 를 사용하고 있는데 이를 LocalTime 으로 바꾸는 작업 진행

shouwn commented 5 years ago

요구 사항 변경에 따른 DB 수정

수정 사항

Article

Destination

추가 사항

템플릿

삭제 사항

Report

레포트 삭제

shouwn commented 5 years ago

DB 수정사항 반영

Template 추가

Template 는 Preset 을 가지고 있는 클래스입니다.

Preset

preset 은 step 과 동일한 내용을 가지고 있지만 다른 테이블 입니다.

template 에 저장할 때는 preset 을 사용하고 각 preset 의 toStep 메소드를 이용하여 Article에 저장해 주세요.

Article 수정

Destination 수정

이동수단을 추가하였습니다. vehicle 프로퍼티

vehicle은 enum입니다.

Report 삭제