@token = {{login.response.body.data.token}}
@tokenAdmin = {{loginAdmin.response.body.data.token}}
@tokenVerifikator = {{loginVerifikator.response.body.data.token}}
@implementasiId = {{createImplementasi.response.body.data.result.0.id}}
@verifikasi1Id = {{createImplementasi.response.body.data.result.0.verifications.0.id}}
@verifikasi2Id = {{createImplementasi.response.body.data.result.0.verifications.1.id}}

@questionnaire1Id = {{createQuestionnaire.response.body.data.result.0.id}}
@questionnaire2Id = {{createSimpleQuestionnaire.response.body.data.result.0.id}}
@document1Id = {{createQuestionnaire.response.body.data.result.0.documents.0.id}}
@document2Id = {{createQuestionnaire.response.body.data.result.0.documents.1.id}}
@attachmentId = {{uploadAttachment.response.body.data.result.0.id}}
@attachmentId2 = {{uploadAttachment2.response.body.data.result.0.id}}
@attachmentId3 = {{uploadAttachment3.response.body.data.result.0.id}}
@attachmentId4 = {{uploadAttachment4.response.body.data.result.0.id}}
@attachmentId5 = {{uploadAttachment5.response.body.data.result.0.id}}
@attachmentUuid = {{uploadAttachment.response.body.data.result.0.uuid}}

@questionnairexId = {{listQuestionnaireByUser.response.body.data.result.0.id}}
@questionnaireyId = {{listQuestionnaireByUser.response.body.data.result.1.id}}

# @name login
POST {{$dotenv BASE_URL}}/v5/auth/login
Content-Type: application/json

{
    "username": "{{$dotenv USERNAME_PAK_USER_DINAS}}",
    "password": "{{$dotenv PASSWORD_PAK_USER_DINAS}}"
}

###
# @name loggedinUserProfile
GET {{$dotenv BASE_URL}}/v5/pak/user/myprofile
Authorization: Bearer {{token}}

###

# @name loginAdmin
POST {{$dotenv BASE_URL}}/v5/auth/login
Content-Type: application/json

{
    "username": "{{$dotenv USERNAME_PAK_ADMIN}}",
    "password": "{{$dotenv PASSWORD_PAK_ADMIN}}"
}

###
# @name loginVerifikator
POST {{$dotenv BASE_URL}}/v5/auth/login
Content-Type: application/json

{
    "username": "{{$dotenv USERNAME_PAK_VERIFIKATOR}}",
    "password": "{{$dotenv PASSWORD_PAK_VERIFIKATOR}}"
}

###

# @name createSimpleQuestionnaire
POST {{$dotenv BASE_URL}}/v5/pak/questionnaire/create
Authorization: Bearer {{tokenAdmin}}
Content-Type: application/json

{
    "nama": "Regulasi baru terkait implementasi PAK.",
    "deskripsi": "Regulasi baru terkait implementasi PAK",
    "nama_dokumen": "Dokumen Baru"
}

###

# @name createQuestionnaire
POST {{$dotenv BASE_URL}}/v5/pak/questionnaire/create
Authorization: Bearer {{tokenAdmin}}
Content-Type: application/json

{
    "nama": "Regulasi baru terkait implementasi PAK",
    "deskripsi": "Regulasi baru terkait implementasi PAK",
    "is_using_doc_info": true,
    "documents": [
        {
            "jenis_dokumen": "Draft Perkada",
            "is_using_doc_info": true
        },
        {
            "jenis_dokumen": "Perkada",
            "is_using_doc_info": true
        }
    ]
}

###

# @name listQuestionnaireByAdmin
GET {{$dotenv BASE_URL}}/v5/pak/questionnaire/index?limit=5&offset=0
Authorization: Bearer {{tokenAdmin}}

###

# @name listQuestionnaireByUser
GET {{$dotenv BASE_URL}}/v5/pak/questionnaire/index?limit=2&offset=0&is_active=true
Authorization: Bearer {{token}}

###
# @name uploadAttachment
POST {{$dotenv BASE_URL}}/v5/pak/implementasi/attachment/upload
Authorization: Bearer {{token}}
Content-Type: multipart/form-data; boundary=----JustAnotherBoundary

------JustAnotherBoundary
Content-Disposition: form-data; name="file"; filename="test.pdf"
Content-Type: application/pdf

<  ./sample-files/test.pdf
------JustAnotherBoundary--

###

# @name uploadAttachment2
POST {{$dotenv BASE_URL}}/v5/pak/implementasi/attachment/upload
Authorization: Bearer {{token}}
Content-Type: multipart/form-data; boundary=----JustAnotherBoundary

------JustAnotherBoundary
Content-Disposition: form-data; name="file"; filename="test.pdf"
Content-Type: application/pdf

<  ./sample-files/test.pdf
------JustAnotherBoundary--

###

# @name uploadAttachment3
POST {{$dotenv BASE_URL}}/v5/pak/implementasi/attachment/upload
Authorization: Bearer {{token}}
Content-Type: multipart/form-data; boundary=----JustAnotherBoundary

------JustAnotherBoundary
Content-Disposition: form-data; name="file"; filename="test.pdf"
Content-Type: application/pdf

<  ./sample-files/test.pdf
------JustAnotherBoundary--

###

###

# create implementasi and save as draft
# @name createImplementasiFailedSameQuestionnaire
POST {{$dotenv BASE_URL}}/v5/pak/implementasi/create
Content-Type: application/json
Authorization: Bearer {{token}}

{
    "verifications":[
        {
            "questionnaire_id":"{{questionnaire1Id}}",
            "attachment":[
                {
                    "attachment_id":"{{attachmentId}}",
                    "jenis_dokumen_id":"{{document1Id}}",
                    "tahun":2019,
                    "nomor":"14",
                    "tentang":"Draft Perkada Implementasi PAK",
                    "tanggal_ttd":"2020-10-10 00:00:00"
                }
            ]
        },
        {
            "questionnaire_id":"{{questionnaire1Id}}",
            "attachment":[
                {
                    "attachment_id":"{{attachmentId2}}"
                }
            ]
        }
    ]
}

# {
#   "success": false,
#   "message": "Validation Errors",
#   "errors": {
#     "field": "questionnaire_id",
#     "message": "questionnaire_id tidak boleh sama"
#   }
# }

###

# create implementasi and save as draft
# @name createImplementasi
POST {{$dotenv BASE_URL}}/v5/pak/implementasi/create
Content-Type: application/json
Authorization: Bearer {{token}}

{
    "verifications":[
        {
            "questionnaire_id":"{{questionnaire1Id}}",
            "attachment":[
                {
                    "attachment_id":"{{attachmentId}}",
                    "jenis_dokumen_id":"{{document1Id}}",
                    "tahun":2019,
                    "nomor":"14",
                    "tentang":"Draft Perkada Implementasi PAK",
                    "tanggal_ttd":"2020-10-10 00:00:00"
                },
                {
                    "attachment_id":"{{attachmentId2}}",
                    "jenis_dokumen_id":"{{document2Id}}",
                    "tahun":2020,
                    "nomor":"21",
                    "tentang":"Perkada Implementasi PAK",
                    "tanggal_ttd":"2020-10-10 00:00:00"
                }
            ]
        },
        {
            "questionnaire_id":"{{questionnaire2Id}}",
            "attachment":[
                {
                    "attachment_id":"{{attachmentId3}}"
                }
            ]
        }
    ]
}

# {
#   "success": true,
#   "data": {
#     "total_record": 1,
#     "per_page": 1,
#     "total_page": 1,
#     "current_page": 1,
#     "result": [
#       {
#         "id": "92",
#         "instansi_id": 4,
#         "created_at": "2021-02-15 09:06:09",
#         "created_by": 51,
#         "updated_at": null,
#         "updated_by": null,
#         "deleted_at": null,
#         "deleted_by": null,
#         "status": "Draft",
#         "nama_instansi": "Penjaga Pendidikan",
#         "verified_by": "-",
#         "verification_means": "0,00",
#         "verifications": [
#           {
#             "id": 101,
#             "questionnaire_id": 105,
#             "implementasi_id": 92,
#             "nilai_verifikasi": 0,
#             "verified_by": null,
#             "verified_at": null,
#             "questionnaire": "Regulasi baru terkait implementasi PAK",
#             "attachments": [
#               {
#                 "id": 126,
#                 "verifikasi_id": 101,
#                 "attachment_id": 89,
#                 "created_at": "2021-02-15 09:06:09",
#                 "created_by": null,
#                 "jenis_dokumen_id": 82,
#                 "tahun": 2019,
#                 "nomor": 14,
#                 "tentang": "Draft Perkada Implementasi PAK",
#                 "tanggal_ttd": "2020-10-10 00:00:00",
#                 "jenisDokumen": {
#                   "id": 82,
#                   "jenis_dokumen": "Draft Perkada",
#                   "is_using_doc_info": true,
#                   "created_at": "2021-02-15 08:52:48"
#                 },
#                 "file": {
#                   "id": 89,
#                   "uuid": "00adf5ca-1fde-4243-92b1-84fdade38c43",
#                   "filename": "test.pdf"
#                 }
#               },
#               {
#                 "id": 127,
#                 "verifikasi_id": 101,
#                 "attachment_id": 90,
#                 "created_at": "2021-02-15 09:06:09",
#                 "created_by": null,
#                 "jenis_dokumen_id": 83,
#                 "tahun": 2020,
#                 "nomor": 21,
#                 "tentang": "Perkada Implementasi PAK",
#                 "tanggal_ttd": "2020-10-10 00:00:00",
#                 "jenisDokumen": {
#                   "id": 83,
#                   "jenis_dokumen": "Perkada",
#                   "is_using_doc_info": true,
#                   "created_at": "2021-02-15 08:52:48"
#                 },
#                 "file": {
#                   "id": 90,
#                   "uuid": "cac4ee94-6fde-4666-99e3-2ae63e9fc9f4",
#                   "filename": "test.pdf"
#                 }
#               }
#             ]
#           },
#           {
#             "id": 102,
#             "questionnaire_id": 104,
#             "implementasi_id": 92,
#             "nilai_verifikasi": 0,
#             "verified_by": null,
#             "verified_at": null,
#             "questionnaire": "Regulasi baru terkait implementasi PAK.",
#             "attachments": [
#               {
#                 "id": 128,
#                 "verifikasi_id": 102,
#                 "attachment_id": 91,
#                 "created_at": "2021-02-15 09:06:09",
#                 "created_by": null,
#                 "jenis_dokumen_id": null,
#                 "tahun": null,
#                 "nomor": null,
#                 "tentang": null,
#                 "tanggal_ttd": null,
#                 "jenisDokumen": false,
#                 "file": {
#                   "id": 91,
#                   "uuid": "b8d4fe90-2ffa-4d3b-9be4-582b665403ef",
#                   "filename": "test.pdf"
#                 }
#               }
#             ]
#           }
#         ]
#       }
#     ]
#   }
# }

###

# create implementasi and submit. The output is same as @createImplementasi
# @name createAndSubmitImplementasi
POST {{$dotenv BASE_URL}}/v5/pak/implementasi/create-and-submit
Content-Type: application/json
Authorization: Bearer {{token}}

{
    "verifications":[
        {
            "questionnaire_id":"{{questionnaire1Id}}",
            "attachment":[
                {
                    "attachment_id":"{{attachmentId}}",
                    "jenis_dokumen_id":"{{document1Id}}",
                    "tahun":2019,
                    "nomor":"14",
                    "tentang":"Draft Perkada Implementasi PAK",
                    "tanggal_ttd":"2020-10-10 00:00:00"
                },
                {
                    "attachment_id":"{{attachmentId}}",
                    "jenis_dokumen_id":"{{document2Id}}",
                    "tahun":2020,
                    "nomor":"21",
                    "tentang":"Perkada Implementasi PAK",
                    "tanggal_ttd":"2020-10-10 00:00:00"
                }
            ]
        },
        {
            "questionnaire_id":"{{questionnaire2Id}}",
            "attachment":[
                {
                    "attachment_id":"{{attachmentId}}"
                }
            ]
        }
    ]
}

###

# param limit int : limit list
# param offset int : offset
# param order by string
# param sort string : sorting method (asc or desc)
# param dinas string : search by dinas
# param trashed bool : include trashed/deleted items default false
GET {{$dotenv BASE_URL}}/v5/pak/implementasi/index?limit=5&offset=0&order_by=id&sort=asc&dinas=jaga&trashed=false
Authorization: Bearer {{token}}

###

GET {{$dotenv BASE_URL}}/v5/pak/implementasi/view/{{implementasiId}}
Authorization: Bearer {{token}}

# {
#   "success": true,
#   "data": {
#     "total_record": 1,
#     "per_page": 1,
#     "total_page": 1,
#     "current_page": 1,
#     "result": [
#       {
#         "id": "92",
#         "instansi_id": 4,
#         "created_at": "2021-02-15 09:06:09",
#         "created_by": 51,
#         "updated_at": null,
#         "updated_by": null,
#         "deleted_at": null,
#         "deleted_by": null,
#         "status": "Draft",
#         "nama_instansi": "Penjaga Pendidikan",
#         "verified_by": "-",
#         "verification_means": "0,00",
#         "verifications": [
#           {
#             "id": 101,
#             "questionnaire_id": 105,
#             "implementasi_id": 92,
#             "nilai_verifikasi": 0,
#             "verified_by": null,
#             "verified_at": null,
#             "questionnaire": "Regulasi baru terkait implementasi PAK",
#             "attachments": [
#               {
#                 "id": 126,
#                 "verifikasi_id": 101,
#                 "attachment_id": 89,
#                 "created_at": "2021-02-15 09:06:09",
#                 "created_by": null,
#                 "jenis_dokumen_id": 82,
#                 "tahun": 2019,
#                 "nomor": 14,
#                 "tentang": "Draft Perkada Implementasi PAK",
#                 "tanggal_ttd": "2020-10-10 00:00:00",
#                 "jenisDokumen": {
#                   "id": 82,
#                   "jenis_dokumen": "Draft Perkada",
#                   "is_using_doc_info": true,
#                   "created_at": "2021-02-15 08:52:48"
#                 },
#                 "file": {
#                   "id": 89,
#                   "uuid": "00adf5ca-1fde-4243-92b1-84fdade38c43",
#                   "filename": "test.pdf"
#                 }
#               },
#               {
#                 "id": 127,
#                 "verifikasi_id": 101,
#                 "attachment_id": 90,
#                 "created_at": "2021-02-15 09:06:09",
#                 "created_by": null,
#                 "jenis_dokumen_id": 83,
#                 "tahun": 2020,
#                 "nomor": 21,
#                 "tentang": "Perkada Implementasi PAK",
#                 "tanggal_ttd": "2020-10-10 00:00:00",
#                 "jenisDokumen": {
#                   "id": 83,
#                   "jenis_dokumen": "Perkada",
#                   "is_using_doc_info": true,
#                   "created_at": "2021-02-15 08:52:48"
#                 },
#                 "file": {
#                   "id": 90,
#                   "uuid": "cac4ee94-6fde-4666-99e3-2ae63e9fc9f4",
#                   "filename": "test.pdf"
#                 }
#               }
#             ]
#           },
#           {
#             "id": 102,
#             "questionnaire_id": 104,
#             "implementasi_id": 92,
#             "nilai_verifikasi": 0,
#             "verified_by": null,
#             "verified_at": null,
#             "questionnaire": "Regulasi baru terkait implementasi PAK.",
#             "attachments": [
#               {
#                 "id": 128,
#                 "verifikasi_id": 102,
#                 "attachment_id": 91,
#                 "created_at": "2021-02-15 09:06:09",
#                 "created_by": null,
#                 "jenis_dokumen_id": null,
#                 "tahun": null,
#                 "nomor": null,
#                 "tentang": null,
#                 "tanggal_ttd": null,
#                 "jenisDokumen": false,
#                 "file": {
#                   "id": 91,
#                   "uuid": "b8d4fe90-2ffa-4d3b-9be4-582b665403ef",
#                   "filename": "test.pdf"
#                 }
#               }
#             ]
#           }
#         ]
#       }
#     ]
#   }
# }

###

# @name downloadAttachmentFile
GET {{$dotenv BASE_URL}}/v5/pak/implementasi/attachment/download/{{attachmentUuid}}
Authorization: Bearer {{token}}

###

# @name deleteAttachment
GET {{$dotenv BASE_URL}}/v5/pak/implementasi/attachment/delete/{{attachmentUuid}}
Authorization: Bearer {{token}}

###

# @name uploadAttachment4
POST {{$dotenv BASE_URL}}/v5/pak/implementasi/attachment/upload
Authorization: Bearer {{token}}
Content-Type: multipart/form-data; boundary=----JustAnotherBoundary

------JustAnotherBoundary
Content-Disposition: form-data; name="file"; filename="test.pdf"
Content-Type: application/pdf

<  ./sample-files/test.pdf
------JustAnotherBoundary--
###
# @name uploadAttachment5
POST {{$dotenv BASE_URL}}/v5/pak/implementasi/attachment/upload
Authorization: Bearer {{token}}
Content-Type: multipart/form-data; boundary=----JustAnotherBoundary

------JustAnotherBoundary
Content-Disposition: form-data; name="file"; filename="test.pdf"
Content-Type: application/pdf

<  ./sample-files/test.pdf
------JustAnotherBoundary--

###
# update implementasi and save as draft
# see delete attachment method 
# @name updateImplementasi
POST {{$dotenv BASE_URL}}/v5/pak/implementasi/update/{{implementasiId}}
Content-Type: application/json
Authorization: Bearer {{token}}

{
    "id":"{{implementasiId}}",
    "verifications":[
        {
            "id":"{{verifikasi1Id}}",
            "questionnaire_id":"{{questionnaire1Id}}",
            "attachment":[
                {
                    "attachment_id":"{{attachmentId}}",
                    "jenis_dokumen_id":"{{document1Id}}",
                    "tahun":2019,
                    "nomor":"14",
                    "tentang":"Draft Perkada Implementasi PAK Edited",
                    "tanggal_ttd":"2020-10-10 00:00:00"
                },
                {
                    "attachment_id":"{{attachmentId4}}",
                    "jenis_dokumen_id":"{{document2Id}}",
                    "tahun":2020,
                    "nomor":"21",
                    "tentang":"Perkada Implementasi PAK New",
                    "tanggal_ttd":"2020-10-10 00:00:00"
                },
                {
                    "attachment_id":"{{attachmentId5}}",
                    "jenis_dokumen_id":"{{document2Id}}",
                    "tahun":2020,
                    "nomor":"21",
                    "tentang":"Perkada Implementasi PAK New",
                    "tanggal_ttd":"2020-10-10 00:00:00"
                }
            ]
        },
        {
            "id":"{{verifikasi2Id}}",
            "questionnaire_id":"{{questionnaire2Id}}",
            "attachment":[
                {
                    "attachment_id":"{{attachmentId3}}"
                }
            ]
        }
    ]
}

# {
#   "success": true,
#   "data": {
#     "total_record": 1,
#     "per_page": 1,
#     "total_page": 1,
#     "current_page": 1,
#     "result": [
#       {
#         "id": "92",
#         "instansi_id": 4,
#         "created_at": "2021-02-15 09:06:09",
#         "created_by": 51,
#         "updated_at": "2021-02-15 09:11:47",
#         "updated_by": 51,
#         "deleted_at": null,
#         "deleted_by": null,
#         "status": "Draft",
#         "nama_instansi": "Penjaga Pendidikan",
#         "verified_by": "-",
#         "verification_means": "0,00",
#         "verifications": [
#           {
#             "id": 101,
#             "questionnaire_id": 105,
#             "implementasi_id": 92,
#             "nilai_verifikasi": 0,
#             "verified_by": null,
#             "verified_at": null,
#             "questionnaire": "Regulasi baru terkait implementasi PAK",
#             "attachments": [
#               {
#                 "id": 126,
#                 "verifikasi_id": 101,
#                 "attachment_id": 89,
#                 "created_at": "2021-02-15 09:06:09",
#                 "created_by": null,
#                 "jenis_dokumen_id": 82,
#                 "tahun": 2019,
#                 "nomor": 14,
#                 "tentang": "Draft Perkada Implementasi PAK Edited",
#                 "tanggal_ttd": "2020-10-10 00:00:00",
#                 "jenisDokumen": {
#                   "id": 82,
#                   "jenis_dokumen": "Draft Perkada",
#                   "is_using_doc_info": true,
#                   "created_at": "2021-02-15 08:52:48"
#                 },
#                 "file": {
#                   "id": 89,
#                   "uuid": "00adf5ca-1fde-4243-92b1-84fdade38c43",
#                   "filename": "test.pdf"
#                 }
#               },
#               {
#                 "id": 129,
#                 "verifikasi_id": 101,
#                 "attachment_id": 92,
#                 "created_at": "2021-02-15 09:11:47",
#                 "created_by": null,
#                 "jenis_dokumen_id": 83,
#                 "tahun": 2020,
#                 "nomor": 21,
#                 "tentang": "Perkada Implementasi PAK New",
#                 "tanggal_ttd": "2020-10-10 00:00:00",
#                 "jenisDokumen": {
#                   "id": 83,
#                   "jenis_dokumen": "Perkada",
#                   "is_using_doc_info": true,
#                   "created_at": "2021-02-15 08:52:48"
#                 },
#                 "file": {
#                   "id": 92,
#                   "uuid": "1412c962-71d3-4604-b428-b61dbba42eaa",
#                   "filename": "test.pdf"
#                 }
#               },
#               {
#                 "id": 130,
#                 "verifikasi_id": 101,
#                 "attachment_id": 93,
#                 "created_at": "2021-02-15 09:11:47",
#                 "created_by": null,
#                 "jenis_dokumen_id": 83,
#                 "tahun": 2020,
#                 "nomor": 21,
#                 "tentang": "Perkada Implementasi PAK New",
#                 "tanggal_ttd": "2020-10-10 00:00:00",
#                 "jenisDokumen": {
#                   "id": 83,
#                   "jenis_dokumen": "Perkada",
#                   "is_using_doc_info": true,
#                   "created_at": "2021-02-15 08:52:48"
#                 },
#                 "file": {
#                   "id": 93,
#                   "uuid": "edc606fc-500a-4f8c-a629-389d130ecd9f",
#                   "filename": "test.pdf"
#                 }
#               }
#             ]
#           },
#           {
#             "id": 102,
#             "questionnaire_id": 104,
#             "implementasi_id": 92,
#             "nilai_verifikasi": 0,
#             "verified_by": null,
#             "verified_at": null,
#             "questionnaire": "Regulasi baru terkait implementasi PAK.",
#             "attachments": [
#               {
#                 "id": 128,
#                 "verifikasi_id": 102,
#                 "attachment_id": 91,
#                 "created_at": "2021-02-15 09:06:09",
#                 "created_by": null,
#                 "jenis_dokumen_id": null,
#                 "tahun": null,
#                 "nomor": null,
#                 "tentang": null,
#                 "tanggal_ttd": null,
#                 "jenisDokumen": false,
#                 "file": {
#                   "id": 91,
#                   "uuid": "b8d4fe90-2ffa-4d3b-9be4-582b665403ef",
#                   "filename": "test.pdf"
#                 }
#               }
#             ]
#           }
#         ]
#       }
#     ]
#   }
# }

###

# update implementasi and submit
# see delete attachment method 
# @name updateAndSubmitImplementasi
POST {{$dotenv BASE_URL}}/v5/pak/implementasi/update-and-submit/{{implementasiId}}
Content-Type: application/json
Authorization: Bearer {{token}}

{
    "id":"{{implementasiId}}",
    "verifications":[
        {
            "id":"{{verifikasi1Id}}",
            "questionnaire_id":"{{questionnaire1Id}}",
            "attachment":[
                {   
                    "attachment_id":"{{attachmentId}}",
                    "jenis_dokumen_id":"{{document1Id}}",
                    "tahun":2019,
                    "nomor":"14",
                    "tentang":"Draft Perkada Implementasi PAK Edited",
                    "tanggal_ttd":"2020-10-10 00:00:00"
                },
                {
                    "attachment_id":"{{attachmentId4}}",
                    "jenis_dokumen_id":"{{document2Id}}",
                    "tahun":2020,
                    "nomor":"21",
                    "tentang":"Perkada Implementasi PAK Edited",
                    "tanggal_ttd":"2020-10-10 00:00:00"
                }
            ]
        },
        {
            "id":"{{verifikasi2Id}}",
            "questionnaire_id":"{{questionnaire2Id}}",
            "attachment":[
                {
                    "attachment_id":"{{attachmentId3}}"
                }
            ]
        }
    ]
}

# {
#   "success": true,
#   "data": {
#     "total_record": 1,
#     "per_page": 1,
#     "total_page": 1,
#     "current_page": 1,
#     "result": [
#       {
#         "id": "92",
#         "instansi_id": 4,
#         "created_at": "2021-02-15 09:06:09",
#         "created_by": 51,
#         "updated_at": "2021-02-15 09:19:07",
#         "updated_by": 51,
#         "deleted_at": null,
#         "deleted_by": null,
#         "status": "On Progress",
#         "nama_instansi": "Penjaga Pendidikan",
#         "verified_by": "-",
#         "verification_means": "0,00",
#         "verifications": [
#           {
#             "id": 101,
#             "questionnaire_id": 105,
#             "implementasi_id": 92,
#             "nilai_verifikasi": 0,
#             "verified_by": null,
#             "verified_at": null,
#             "questionnaire": "Regulasi baru terkait implementasi PAK",
#             "attachments": [
#               {
#                 "id": 126,
#                 "verifikasi_id": 101,
#                 "attachment_id": 89,
#                 "created_at": "2021-02-15 09:06:09",
#                 "created_by": null,
#                 "jenis_dokumen_id": 82,
#                 "tahun": 2019,
#                 "nomor": 14,
#                 "tentang": "Draft Perkada Implementasi PAK Edited",
#                 "tanggal_ttd": "2020-10-10 00:00:00",
#                 "jenisDokumen": {
#                   "id": 82,
#                   "jenis_dokumen": "Draft Perkada",
#                   "is_using_doc_info": true,
#                   "created_at": "2021-02-15 08:52:48"
#                 },
#                 "file": {
#                   "id": 89,
#                   "uuid": "00adf5ca-1fde-4243-92b1-84fdade38c43",
#                   "filename": "test.pdf"
#                 }
#               },
#               {
#                 "id": 129,
#                 "verifikasi_id": 101,
#                 "attachment_id": 92,
#                 "created_at": "2021-02-15 09:11:47",
#                 "created_by": null,
#                 "jenis_dokumen_id": 83,
#                 "tahun": 2020,
#                 "nomor": 21,
#                 "tentang": "Perkada Implementasi PAK Edited",
#                 "tanggal_ttd": "2020-10-10 00:00:00",
#                 "jenisDokumen": {
#                   "id": 83,
#                   "jenis_dokumen": "Perkada",
#                   "is_using_doc_info": true,
#                   "created_at": "2021-02-15 08:52:48"
#                 },
#                 "file": {
#                   "id": 92,
#                   "uuid": "1412c962-71d3-4604-b428-b61dbba42eaa",
#                   "filename": "test.pdf"
#                 }
#               }
#             ]
#           },
#           {
#             "id": 102,
#             "questionnaire_id": 104,
#             "implementasi_id": 92,
#             "nilai_verifikasi": 0,
#             "verified_by": null,
#             "verified_at": null,
#             "questionnaire": "Regulasi baru terkait implementasi PAK.",
#             "attachments": [
#               {
#                 "id": 128,
#                 "verifikasi_id": 102,
#                 "attachment_id": 91,
#                 "created_at": "2021-02-15 09:06:09",
#                 "created_by": null,
#                 "jenis_dokumen_id": null,
#                 "tahun": null,
#                 "nomor": null,
#                 "tentang": null,
#                 "tanggal_ttd": null,
#                 "jenisDokumen": false,
#                 "file": {
#                   "id": 91,
#                   "uuid": "b8d4fe90-2ffa-4d3b-9be4-582b665403ef",
#                   "filename": "test.pdf"
#                 }
#               }
#             ]
#           }
#         ]
#       }
#     ]
#   }
# }

###

POST {{$dotenv BASE_URL}}/v5/pak/implementasi/verify
Content-Type: application/json
Authorization: Bearer {{tokenVerifikator}}

{
    "verifikasi_id": "{{verifikasi1Id}}",
    "nilai_verifikasi":70
}

# {
#   "success": true,
#   "data": {
#     "total_record": 1,
#     "per_page": 1,
#     "total_page": 1,
#     "current_page": 1,
#     "result": [
#       {
#         "id": 39,
#         "questionnaire_id": 74,
#         "implementasi_id": 54,
#         "nilai_verifikasi": 70,
#         "verified_by": 52,
#         "created_at": "2021-01-05 07:18:53",
#         "created_by": 51,
#         "updated_at": "2021-01-05 07:49:04",
#         "updated_by": 52,
#         "deleted_at": null,
#         "deleted_by": null
#       }
#     ]
#   }
# }

###

POST {{$dotenv BASE_URL}}/v5/pak/implementasi/batch-verify
Content-Type: application/json
Authorization: Bearer {{tokenVerifikator}}

{
    "verifications": [
        {
            "verifikasi_id": "{{verifikasi1Id}}",
            "nilai_verifikasi":77
        },
        {
            "verifikasi_id": "{{verifikasi2Id}}",
            "nilai_verifikasi":80
        }
    ]
}

###

POST {{$dotenv BASE_URL}}/v5/pak/implementasi/delete/{{implementasiId}}
Content-Type: application/json
Authorization: Bearer {{token}}

{
    "id": "{{implementasiId}}"
}

# {
#   "success": true,
#   "data": {
#     "total_record": 1,
#     "per_page": 1,
#     "total_page": 1,
#     "current_page": 1,
#     "result": [
#       {
#         "id": 8,
#         "instansi_id": 4
#         "created_at": "2020-11-30 03:51:13",
#         "created_by": 50,
#         "updated_at": "2020-11-30 03:53:26",
#         "updated_by": 50,
#         "deleted_at": "2020-11-30 03:53:26",
#         "deleted_by": 50
#       }
#     ]
#   }
# }

### 

# param limit int : limit list
# param offset int : offset
# param order by string
# param sort string : sorting method (asc or desc)
# param dinas string : search by dinas
# param trashed bool : include trashed/deleted items default false
GET {{$dotenv BASE_URL}}/v5/pak/implementasi/index?limit=2&offset=1&order_by=id&sort=asc&dinas=jaga&trashed=false
Authorization: Bearer {{token}}

# {
#   "success": true,
#   "data": {
#     "total_record": 72,
#     "per_page": 2,
#     "total_page": 36,
#     "current_page": 1,
#     "result": [
#       {
#         "id": 3,
#         "instansi_id": 4,
#         "created_at": "2020-12-10 08:35:29",
#         "created_by": 50,
#         "updated_at": null,
#         "updated_by": null,
#         "deleted_at": null,
#         "deleted_by": null,
#         "status": "Draft",
#         "nama_instansi": "Penjaga Pendidikan",
#         "verified_by": "Nama User 50",
#         "verification_means": "70,00"
#       },
#       {
#         "id": 5,
#         "instansi_id": 4,
#         "created_at": "2020-12-10 09:50:50",
#         "created_by": 50,
#         "updated_at": null,
#         "updated_by": null,
#         "deleted_at": null,
#         "deleted_by": null,
#         "status": "Draft",
#         "nama_instansi": "Penjaga Pendidikan",
#         "verified_by": "Nama User 50",
#         "verification_means": "60,00"
#       }
#     ]
#   }
# }

###

POST {{$dotenv BASE_URL}}/v5/pak/implementasi/restore/{{implementasiId}}
Content-Type: application/json
Authorization: Bearer {{tokenAdmin}}

{
    "id": "{{implementasiId}}"
}

# {
#   "success": true,
#   "data": {
#     "total_record": 1,
#     "per_page": 1,
#     "total_page": 1,
#     "current_page": 1,
#     "result": [
#       {
#         "id": 8,
#         "instansi_id": 4
#         "created_at": "2020-11-30 03:51:13",
#         "created_by": 50,
#         "updated_at": "2020-11-30 03:54:51",
#         "updated_by": 50,
#         "deleted_at": null,
#         "deleted_by": null
#       }
#     ]
#   }
# }

### 

# permanently delete 
POST {{$dotenv BASE_URL}}/v5/pak/implementasi/destroy/{{implementasiId}}
Content-Type: application/json
Authorization: Bearer {{tokenAdmin}}

{
    "id": "{{implementasiId}}"
}

# {
#   "success": true,
#   "data": {
#     "total_record": 1,
#     "per_page": 1,
#     "total_page": 1,
#     "current_page": 1,
#     "result": [
#       {
#         "id": 8,
#         "instansi_id": 4
#         "created_at": "2020-11-30 03:51:13",
#         "created_by": 50,
#         "updated_at": "2020-11-30 03:54:51",
#         "updated_by": 50,
#         "deleted_at": null,
#         "deleted_by": null
#       }
#     ]
#   }
# }

### 

POST {{$dotenv BASE_URL}}/v5/pak/implementasi/create
Content-Type: application/json
Authorization: Bearer {{token}}

{
  "verifications": [
    {
      "questionnaire_id": 16,
      "attachment": [
        {
          "attachment_id": "1967"
        }
      ]
    },
    {
      "questionnaire_id": 43,
      "attachment": [
        {
          "attachment_id": "1968"
        },
        {
          "attachment_id": "1969"
        }
      ]
    },
    {
      "questionnaire_id": 17,
      "attachment": [
        {
          "jenis_dokumen_id": 25,
          "attachment_id": "1970"
        },
        {
          "jenis_dokumen_id": 26,
          "nomor": "No14",
          "tahun": "2020",
          "tentang": "Draft Perkada",
          "tanggal_ttd": "2021-02-09",
          "attachment_id": "1971"
        }
      ]
    }
  ]
}

###
GET {{$dotenv BASE_URL}}/v5/pak/implementasi/view/60
Authorization: Bearer {{token}}