---
# System prepended metadata

title: Database Schema

---

# Database Schema
```plantuml

package universitas {
    
    entity calon_mahasiswa {
        entity_id: char(36) {UUID}
        no_pendaftar: int(10)
        nama: varchar (55)
        email: varchar (55)
        no_hp: int (12)
        ---
        created_at: timestamp
        created_by: varchar(36)
        updated_at: timestamp
        updated_by: varchar(36)
        deleted_at: timestamp
        deleted_by: varchar(36)
    }
    
    entity mahasiswa {
        entity_id: char(36) {UUID}
        nim: int(10)
        nama: varchar (55)
        email: varchar (55)
        no_hp: int (12)
        ---
        created_at: timestamp
        created_by: varchar(36)
        updated_at: timestamp
        updated_by: varchar(36)
        deleted_at: timestamp
        deleted_by: varchar(36)
    }    
    
     entity dosen {
        entity_id : char(36) {UUID}
        nid : char(36) {UUID} 
        nama : char(36) {UUID}
        email: varchar (55)
        no_hp: int (12)
        ---
        created_at: timestamp
        created_by: varchar(36)
        updated_at: timestamp
        updated_by: varchar(36)
        deleted_at: timestamp
        deleted_by: varchar(36)
    }
    
    entity ruangan {
        entity_id : char(36) {UUID}
        kode_ruangan : varchar(12)
        nama_ruangan : varchar(35)
        ---
        created_at: timestamp
        created_by: varchar(36)
        updated_at: timestamp
        updated_by: varchar(36)
        deleted_at: timestamp
        deleted_by: varchar(36)
    }
    
    entity jurusan {
        entity_id : char(36) {UUID}
        kode_jurusan : varchar(12)
        nama_jurusan : varchar(45)
        ---
        created_at: timestamp
        created_by: varchar(36)
        updated_at: timestamp
        updated_by: varchar(36)
        deleted_at: timestamp
        deleted_by: varchar(36)        
    }
    
    entity mata_kuliah {
        entity_id : char(36) {UUID}
        kode_matkul : varchar(12)
        nama_matkul : varchar(45)
        sks : int(2)
        ---
        created_at: timestamp
        created_by: varchar(36)
        updated_at: timestamp
        updated_by: varchar(36)
        deleted_at: timestamp
        deleted_by: varchar(36)        
    }    
    
    entity jadwal_matkul {
        entity_id : char(36) {UUID}
        matkul_id : char(36) {UUID} <<FK>>
        ruangan_id: char(36) {UUID} <<FK>>
        jam_mulai: time
        jam_selesai: time
        ---
        created_at: timestamp
        created_by: varchar(36)
        updated_at: timestamp
        updated_by: varchar(36)
        deleted_at: timestamp
        deleted_by: varchar(36)  
    }
    
    entity kbm {
        entity_id : char(36) {UUID}
        dosen_id : char(36) {UUID} <<FK>>
        jadwal_matkul_id : char(36) {UUID} <<FK>>
        ---
        created_at: timestamp
        created_by: varchar(36)
        updated_at: timestamp
        updated_by: varchar(36)
        deleted_at: timestamp
        deleted_by: varchar(36)  
    }
    
    entity test {
        entity_id : char(36) {UUID}
        tgl_test : datetime
        ruangan_id: char(36) {UUID} <<FK>>
        tipe_test_id: char(36) {UUID} <<FK>>
        jam_mulai: time
        jam_selesai: time
        ---
        created_at: timestamp
        created_by: varchar(36)
        updated_at: timestamp
        updated_by: varchar(36)
        deleted_at: timestamp
        deleted_by: varchar(36)  
    }
    
    entity tipe_test {
        entity_id: char(36) {UUID}
        nama_test: enum('test_masuk', 'uts', 'uas')
        ---
        created_at: timestamp
        created_by: varchar(36)
        updated_at: timestamp
        updated_by: varchar(36)
        deleted_at: timestamp
        deleted_by: varchar(36) 
    }
        
    entity nilai_test_masuk {
        entity_id : char(36) {UUID}
        calon_mahasiswa_id : char(36) {UUID} <<FK>>
        nilai : int(3)
        ---
        created_at: timestamp
        created_by: varchar(36)
        updated_at: timestamp
        updated_by: varchar(36)
        deleted_at: timestamp
        deleted_by: varchar(36) 
    }
}


```