-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #118 from boostcampwm-2024/Feature/#117_CRDT_라이브러리_개선
Feature/#117 crdt 라이브러리 개선
- Loading branch information
Showing
5 changed files
with
115 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { Page as PageInterface } from "@noctaCrdt/Interfaces"; | ||
import { CRDT } from "./Crdt"; | ||
|
||
export class Page implements PageInterface { | ||
id: string; | ||
title: string; | ||
icon: string; | ||
crdt: CRDT; | ||
|
||
constructor(editorCRDT: CRDT = new CRDT(0)) { | ||
// 추후 수정 | ||
this.id = "id"; | ||
this.title = "title"; | ||
this.icon = "icon"; | ||
this.crdt = editorCRDT; | ||
// 직렬화, 역직렬화 메서드 추가 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { WorkSpace as WorkSpaceInterface } from "./Interfaces"; | ||
import { Page } from "./Page"; | ||
|
||
export class WorkSpace implements WorkSpaceInterface { | ||
id: string; | ||
pageList: Page[]; | ||
authUser: object; | ||
|
||
constructor(id: string, pageList: Page[]) { | ||
this.id = id; | ||
this.pageList = pageList; | ||
this.authUser = new Map(); | ||
// 직렬화, 역직렬화 메서드 추가 | ||
} | ||
} |