Skip to content

Commit

Permalink
refactor: WorkSpace, Page 클래스 수정
Browse files Browse the repository at this point in the history
- 각 클래스에 사용되는 클래스들 재사용

#121
  • Loading branch information
hyonun321 committed Nov 14, 2024
1 parent 03dec36 commit 219df50
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
12 changes: 5 additions & 7 deletions @noctaCrdt/Page.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
import { Page as PageInterface } from "@noctaCrdt/Interfaces";
import { CRDT } from "./Crdt";
import { EditorCRDT } from "./Crdt";

export class Page implements PageInterface {
export class Page {
id: string;
title: string;
icon: string;
crdt: CRDT;
crdt: EditorCRDT;

constructor(editorCRDT: CRDT = new CRDT(0)) {
// 추후 수정
constructor(editorCRDT: EditorCRDT = new EditorCRDT(0)) {
// 추후 수정 직렬화, 역직렬화 메서드 추가
this.id = "id";
this.title = "title";
this.icon = "icon";
this.crdt = editorCRDT;
// 직렬화, 역직렬화 메서드 추가
}
}
3 changes: 1 addition & 2 deletions @noctaCrdt/WorkSpace.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { WorkSpace as WorkSpaceInterface } from "./Interfaces";
import { Page } from "./Page";

export class WorkSpace implements WorkSpaceInterface {
export class WorkSpace {
id: string;
pageList: Page[];
authUser: object;
Expand Down

0 comments on commit 219df50

Please sign in to comment.