Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Model] breadcrumb 혹 category같은 data 설계 #8

Open
amorfati0310 opened this issue Oct 23, 2020 · 0 comments
Open

[Model] breadcrumb 혹 category같은 data 설계 #8

amorfati0310 opened this issue Oct 23, 2020 · 0 comments

Comments

@amorfati0310
Copy link
Owner

TIP 1
ID로 자리수로 고정해서 끊어 쓸 수 있게 해놓는 방식 어느 곳에서도 parent - parent에 parent를 알기 용이하다

// 0001, 0001, 0001

const firstSections = [
    {
        id: 0001,   
        title:   '투잡.부업',
        parentId: null,
    },
    {
        id: 0002,   
        title:   '직무.기술',
        parentId: null,
    },
]

const secondSections = [
    {
        id: 00010001,   
        title:   '쿠팡 파트너스',
        // parentId: 0001,
    },
    {
        id: 00010002,   
        title:   '광고.키워드',
        // parentId: 0001,
    },
    {
        id: 00010003,   
        title:   '쉐어하우스',
       // parentId: 0001,
    }
]


const third = [
    {
        id: 000100010001,
        title:   '쿠팡 파트너스 블라 블라 `',
       
    },
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant