taikowiki / taikowiki-svelte

A Wiki Project for Taiko no Tatsujin
https://taiko.wiki
Other
10 stars 11 forks source link

문서 기능 #160

Open hotsixman opened 4 weeks ago

hotsixman commented 4 weeks ago

문서기능

개요

타 위키처럼 문서를 작성/열람/관리 할 수 있는 시스템

sql

document

{
order: "int",
title: "text",
editorUUID: "tinytext",
type: "text",//WikiDocument의 type 프로퍼티 참고
content: "longtext", //markdown
subParagraphs: "longtext", //WikiParagraph 타입 객체들의 배열
editedDate: "timestamp",
editableGrade: "int",
annotaion: "longtext"
}

document/log

{
order: "int",
title: "text",
originalOrder: "int", //원본 문서
type: "text", //WikiDocument의 type 프로퍼티 참고
content: "longtext", //markdown
subParagraphs: "longtext", //WikiParagraph 타입 객체들의 배열
editedDate: "timestamp",
logOrder: "int" //같은 원본 문서를 가지는 글들의 순서,
annotaion: "longtext"
}

types

interface WikiParagraph{
    title: string;
    content: string;//markdown
    subParagraphs: WikiParagraph[]
}

interface WikiRedirectDocumentType{
    name: 'redirect',
    to: string; //리다이렉트 할 문서 제목
}
interface WikiSongDocumentType{
    name: 'song',
    songNo: string; //연결할 곡의 songNo
}
interface WikiNormalDocumentType{
    name: 'normal';
}

interface UnrecordedWikiDocument{
    type: WikiRedirectDocumentType | WikiSongDocumentType | WikiNormalDocumentType;
    title: string;
    content: string; //markdown
    subParagraphs: WikiParagraph[];
    annotaion: string[];//markdown
}

interface WikiDocument extends UnrecordedWikiDocument{
    order:number;
    editorUUID: string;
    editedDate: Date;
    editableGrade: number;
}

문서 작성/수정/열람