• User
    • id: string unique not null
      • 인덱스용
    • loginEmail: string not null
      • 로그인 아이디가 되는 이메일
      • 이메일 형식의 유효성 검사 필요
      • length limit 100
    • loginPwd: string not null
      • base64 형식으로 암호화 예정
      • length limit 200
    • type: string | enum not null
      • 일반 이메일, 소셜(구글 등) 가입 구분
      • 일반 : default, 구글 : google
    • updatedAt: string not null
      • YYYY/MM/ddTHH:mm:ssZ
  • Tree
    • id: string unique not null
      • 인덱스용
    • id: title + 현재시각을 base64로 인코딩
      • 대체해버려도 되는데,,,
      • db 속도 문제가 있음
    • title: string not null
      • 트리 제목
      • length limit 200
    • type: string enum not null
      • 트리의 종류 구분
      • 내 트리: my_tree, 미부여 트리: not_yet_send
    • linkId: string unique not null
      • 트리 링크를 특정하기 위한 id
      • base64 형식으로 암호화 예정
      • length limit 200
    • sendId: string unique
      • 타인에게 트리를 전달할 때 트리를 특정하기 위한 id
      • base64 형식으로 암호화 예정
      • type이 not_yet_send일 경우에만 생성
      • length limit 200
    • treeBgColor: string enum not null
      • 트리 뒤의 배경 색
      • #??????의 hex 값 혹은 enum 값으로 저장
    • groundColor: string enum not null
      • treeBgColor(트리 뒤의 배경 색)과 연동
      • #??????의 hex 값 혹은 enum 값으로 저장
    • treeTopColor: string enum not null
      • 트리의 나뭇잎 부분 색
      • #??????의 hex 값 혹은 enum 값으로 저장
    • treeItemColor: string enum not null
      • 트리 아이템의 색
      • treeTopColor(트리의 나뭇잎 부분 색)과 연동
      • #??????의 hex 값 혹은 enum 값으로 저장
    • treeBottomColor: string enum not null
      • 트리의 기둥 색
      • treeTopColor(트리의 나뭇잎 부분 색)과 연동
      • #??????의 hex 값 혹은 enum 값으로 저장
    • updatedBy: string not null
      • User.id가 값
    • updatedAt: string not null
      • YYYY/MM/ddTHH:mm:ssZ
  • TreeItem
    • id: string unique not null
      • 인덱스용
    • treeId: string not null
      • Tree.id가 값
    • title: string not null
      • 트리 아이템 제목(편지 제목)
      • length limit 200
    • content: string not null
      • 트리 아이템 내용(편지 내용)
      • length limit 2000
    • updatedBy: string not null
      • User.id가 값
    • updatedAt: string not null
      • YYYY/MM/ddTHH:mm:ssZ
  • UserLinkTree
    • id: string unique not null

      • 인덱스용
    • treeId: string not null

      • Tree.id가 값
      • 같은 userId의 경우엔 중복값이 들어갈 수 없음
    • userId: string not null

      • User.Id가 값
    • updatedAt: string not null

      • YYYY/MM/ddTHH:mm:ssZ
    • 트리 링크로 접근 후 로그인 시, 해당 유저가 링크를 통해 접근한 트리를 저장

      • SQL Injection을 방지하기 위해 해당 유저의 UserLinkTree 데이터를 확인한 후, 중복 여부 등을 파악한 최종 최종 최종에 DB 저장하는 걸로
    • 아이템 작성시 기존에 링크를 통해 접근했던 트리 리스트를 확인할 수 있기 위함