Loading views...
Hidra.com Collection Init

Hidra.com Collection Init

Date
Date
2020 Apr 24 0:0
Created by
Created by
Seonglae ChoSeonglae Cho
Created time
Created time
2023 Feb 28 12:39
Last edited by
Last edited by
Seonglae ChoSeonglae Cho
Last edited time
Last edited time
2023 Apr 15 16:52
Refs
Refs
collection 설계
notion image
설계중인데 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...
Attempting to save a field not in schema with strict:false does not save the field. · Issue #5378 · Automattic/mongoose
 
 
노션 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
Join conversation
 
 
 
 
 
 

Recommendations