forked from codesquad-members-2022/todo-list
-
Notifications
You must be signed in to change notification settings - Fork 0
Data Structure
Jamie edited this page Jul 28, 2022
·
1 revision
- 서버 구축을 위해 json-server 사용
- Todo를 등록하거나 수정하는 등의 사용자 액션이 발생했을 때, 들어온
request
를 처리하면서request.body
의 데이터를 가공 →db.json
에action
데이터로 넣어줄 수 있도록 함
interface Users {
id: number;
name: string;
password: string;
profile: string;
}
interface Columns {
id: number;
name: string;
}
interface Tasks {
id: number;
title: string;
contents: string;
columnId: number;
userId: number;
order: number; // 컬럼의 몇번째 TODO인지
}
interface Actions {
id: number;
userId: number;
type: string;
contents: {
column: string;
title: string;
prevColumn?: string;
}
action: 'ADD' | 'REMOVE' | 'MOVE' | 'UPDATE',
executedTime: string;
}