---
# System prepended metadata

title: SQE

---

# SQE

```plantuml
entity UserAdvisor {
    id: varchar(255) <<PK>>
    --
    name: varchar(255)
    email: varchar(255)
    password: varchar(255)
    role: varchar(255)
    phone_number: int
    position: varchar(255)
    status: enum(online,offline)
    created_at: datetime
    updated_at: datetime
}

entity UserCustomer {
    id: varchar(255) <<PK>>
    --
    name: varchar(255)
    email: varchar(255)
    jenis_kelamin: enum(L,P)
    phone_number: int
    ttl: varchar(255)
    document_id: varchar(255)
    status: enum(online,offline)
    metadata: json
    created_at: datetime  
    updated_at: datetime
}

entity Document {
    id: varchar(255) <<PK>>
    --
    ktp: varchar(255)
    npwp: varchar(255)
    sim_a: varchar(255)
    sim_b: varchar(255)
    kk: varchar(255)
    other: json
}

entity Ticket {
    id: varchar(255) <<PK>>
    --
    user_id: varchar(255)
    call_id: varchar(255)
    created_at: datetime
    updated_at: datetime
}

entity Call {
    id: varchar(255) <<PK>>
    --
    type: int
    success: bool
    from_name_call: varchar(255)
    to_name_call: varchar(255)
    time_duration: varchar(255)
    start_duration: datetime
    end_duration: datetime
    created_at: datetime
    updated_at: datetime
}

note right
type = {
    voice: 1
    video: 2
}
end note

entity Message {
    id: varchar(255) <<PK>>
    --
    from_id: varchar(255)
    to_id: varchar(255)
    message: text
    metadata: json
    created_at: datetime
    updated_at: datetime
}

entity Summary {
    id: varchar(255) <<PK>>
    --
    message_id: varchar(255)
    call_id: varchar(255)
    topic: varchar(255)
    background_summary: text
    complaint: text
    solution: text
    attachment: varchar(255)
    metadata: json
    created_at: datetime
    updated_at: datetime
}

UserAdvisor "id"||--|{"user_id" Ticket
UserCustomer "id"||--|{"user_id" Ticket
Call "id"||--|{"call_id" Ticket
UserCustomer "document_id"||--|{"id" Document
Message "from_id | to_id"||--|{"id" UserAdvisor
Message "from_id | to_id"||--|{"id" UserCustomer
Summary "message_id"||--|{"id" Message
Summary "call_id"||--|{"id" Call
    
@enduml
```