collection 설계

설계중인데 shema 프로퍼티 몼슴 몽구스에서
노션은 몽구스 안쓰는듯'
scheme 으로 바꾸고 strict 없에면 자유롭게 properties 추가
Attempting to save a field not in schema with strict:false does not save the field. · Issue #5378 · Automattic/mongoose
Do you want to request a feature or report a bug? bug What is the current behavior? When saving a non-strict model that contains fields not in the schema I would expect it to save all fields. If the current behavior is a bug, please prov...
https://github.com/Automattic/mongoose/issues/5378
노션 3대 의문 - 그냥 잘못 만든거라 여겨야 하나 전체 서치 하려나
collection 에서 왜 content 안저장하지..?
user 에서 왜 space 목록 안저장하지..?
되게 요상한 구조인데...
Collection
- collection view 가 2가지 block 이 있고 collection view table 에도 있다
- collection view block이 실제 블록 역할을 하고
- collection view table data 가 page_sort 라는 녀석으로 content 저장중
- 사실 음 똑같은 데이터 구조라서 그냥 합쳐서 구현할듯
user
- 데이터 보안때문인지 따로 둠
- 전부 보안으로 하면 다른사람 못보니 이렇게 한듯?
- user table 에는 전체공개
- user root 테이블에는 일부공개
- user_settings.json 도 같은 맥락으로 보이는데 데이터 보니까 우리한테 필요없을듯
- user_root 에서 spaces_views 저장
Space
- space 에서는 permission 으로 user 저장
- space view 에서 parent 로 user root 이고
- 편의성을 위해서 collection view 테이블과 collection table 은 통합한다
- collection view 테이블은
- 부모자식 구조
(user, user_setting)User_root → space_view
space → block[text, image ... collection_view → collection_view, collection]
space_view 같이 collection view
문제는 그냥 collection 이 block 을 상속해서 진행시 parent id 따라서 해줘야한다는 건데 그게 class 안에서 되려나?
- 불러올 때는 추가하고
- 추가하거나 삭제 업데이트 하는 경우에는 예외처리해는는 게 맞을ㄷ스
- 2시보고
Join conversation
https://teams.microsoft.com/l/message/19:0fee910809484c83bafb004caa9acde4@thread.skype/1587704392029?tenantId=dc927201-4cff-4d82-9385-b3a10ff05cf1&groupId=bf042947-8aff-4f69-a2f4-02434247e866&parentMessageId=1587704392029&teamName=%EC%86%94%EB%A3%A8%EC%85%98%ED%8C%80&channelName=General&createdTime=1587704392029

Seonglae Cho