Skip to content
eggnee edited this page Dec 7, 2024 · 4 revisions
erDiagram
    MEMBER {
        BIGINT member_id PK "Primary Key"
        VARCHAR username "Max length: 25"
        VARCHAR password "Max length: 25"
        VARCHAR nickname "Max length: 10"
        BOOLEAN is_delete "Soft delete flag"
        DATETIME created_at "Creation timestamp"
        DATETIME updated_at "Last update timestamp"
    }

    COUPON {
        BIGINT coupon_id PK "Primary Key"
        VARCHAR name "Max length: 100"
        INTEGER quantity "Coupon quantity"
        DATETIME start_date "Start date"
        DATETIME end_date "End date"
        BOOLEAN is_delete "Soft delete flag"
        DATETIME created_at "Creation timestamp"
        DATETIME updated_at "Last update timestamp"
    }

    ISSUED_COUPON{
        BIGINT user_coupon_id PK "Primary Key"
        BIGINT member_id FK "Foreign Key referencing MEMBER"
        BIGINT coupon_id FK "Foreign Key referencing COUPON"
        BOOLEAN is_used "Usage status"
        BOOLEAN is_delete "Soft delete flag"
        DATETIME created_at "Creation timestamp"
        DATETIME updated_at "Last update timestamp"
    }

    MEMBER ||--o{ ISSUED_COUPON: ""
    COUPON ||--o{ ISSUED_COUPON: ""
Loading

Clone this wiki locally