Skip to content

Latest commit

 

History

History
59 lines (51 loc) · 1.11 KB

README.md

File metadata and controls

59 lines (51 loc) · 1.11 KB

Qint_backend

erDiagram
    user {
        Long id PK
        String email UK
        String password
        Long correct_answers
        Long incorrect_answers
    }

    category {
        Long id PK
        String name
    }

    question {
        Long id PK
        String contents
        String commentary
        Long category_id FK
    }
    
    answer {
        Long id PK
        String text
        boolean is_correct
        Long question_id FK
    }

    user_incorrect_answers {
        Long id PK
        Long user_id FK
        Long question_id FK
        Long answer_id FK "유저가 선택한 오답"
    }

    email_verification {
        Long id PK
        String auth_code
        String email
        Boolean is_verified
        DateTime created_at
    }

    refresh_token {
        Long id PK
        String token
        date expiry_date
        String email UK
    }

    user ||--o{ user_incorrect_answers : has
    category ||--o{ question : contains
    question ||--|{ answer : has
    question ||--o{ user_incorrect_answers : is_incorrect
    user_incorrect_answers }o--o| answer : has
Loading