Skip to content

Instantly share code, notes, and snippets.

@adiwids
Last active May 23, 2020 14:45
Show Gist options
  • Save adiwids/6e6f120d3e7b2642132246ebeab24abb to your computer and use it in GitHub Desktop.
Save adiwids/6e6f120d3e7b2642132246ebeab24abb to your computer and use it in GitHub Desktop.

:ship_type = Tug, Barge, Spob, Suv, FloatingCrane :ship_type_id/:ship_id = Tug.id, dst

Webapp

POST /webapp/ships/document/upload Request

{
  :ship_type,
  :ship_id,
  ship: { 
    :charter_document,
    // non Tug&Barge
    shippable_attributes: [:international_tonnage_certificate, ...], 
    // Tug&Barge
    tug_attributes: [:international_tonnage_certificate, ...]
    barge_attributes: [:international_tonnage_certificate, ...]
  }
}

POST /webapp/ships/photo/upload Request

{ 
  :ship_type,
  :ship_id,
  ship: { 
    // non Tug&Barge
    shippable_attributes: [:front_view, :left_side_view, ...], 
    // Tug&Barge
    tug_attributes: [:front_view, :left_side_view, ...]
    barge_attributes: [:front_view, :left_side_view, ...]
  }
}

API

POST /api/v1/ships/document/upload Request

{ 
  :ship_type,
  :ship_type_id,
  ship: { 
    :charter_document,
    // non Tug&Barge
    spob: [:international_tonnage_certificate, ...], 
    // Tug&Barge
    tug: [:international_tonnage_certificate, ...]
    barge: [:international_tonnage_certificate, ...]
  }
}

POST /api/v1/ships/photo/upload Request

{ 
  :ship_type,
  :ship_type_id,
  ship: { 
    // non Tug&Barge
    spob: [:front_view, :left_side_view, ...], 
    // Tug&Barge
    tug: [:front_view, :left_side_view, ...]
    barge: [:front_view, :left_side_view, ...]
  }
}

GET /api/v1/ships/{id} Response

{
    "ship": {
        "id": 2,
        "company_id": 1,
        "name": "Tiong Woon Ocean 19 & Tiong Woon 31",
        "call_sign": "9V5496",
        "status": "available",
        "state": "draft",
        "shippable_type": "TugBoat",
        "shippable_id": 1,
        "track_info": {},
        "ship_ownership": "chartered_ship",
        "charter_document": "http://localhost:3000/uploads/ship/2/charter_document.pdf",
        "charter_document_expiry_date": "2020-06-30",
        "shippable": {
            "tug": {
                "id": 1,
                "documents": [
                    {
                        "created_at": "2020-05-15T06:47:43.813+07:00",
                        "document_name": "nationality_certificate",
                        "expired": false,
                        "expired_at": "2020-06-30T00:00:00.000+07:00",
                        "file": "http://localhost:3000/uploads/tug/1/nationality_certificate.pdf",
                        "id": 22,
                        "released_at": null,
                        "remark": null,
                        "status": "waiting",
                        "updated_at": "2020-05-15T06:47:43.813+07:00"
                    },
                    {
                        "created_at": "2020-05-15T06:47:45.648+07:00",
                        "document_name": "rpk_certificate",
                        "expired": false,
                        "expired_at": "2020-06-30T00:00:00.000+07:00",
                        "file": "http://localhost:3000/uploads/tug/1/rpk_certificate.pdf",
                        "id": 23,
                        "released_at": null,
                        "remark": null,
                        "status": "waiting",
                        "updated_at": "2020-05-15T06:47:45.648+07:00"
                    },
                    {
                        "created_at": "2020-05-15T06:47:47.108+07:00",
                        "document_name": "hull_certificate",
                        "expired": false,
                        "expired_at": "2020-06-30T00:00:00.000+07:00",
                        "file": "http://localhost:3000/uploads/tug/1/hull_certificate.pdf",
                        "id": 24,
                        "released_at": null,
                        "remark": null,
                        "status": "waiting",
                        "updated_at": "2020-05-15T06:47:47.108+07:00"
                    },
                    {
                        "created_at": "2020-05-15T06:47:49.275+07:00",
                        "document_name": "machinery_certificate",
                        "expired": false,
                        "expired_at": "2020-06-30T00:00:00.000+07:00",
                        "file": "http://localhost:3000/uploads/tug/1/machinery_certificate.pdf",
                        "id": 25,
                        "released_at": null,
                        "remark": null,
                        "status": "waiting",
                        "updated_at": "2020-05-15T06:47:49.275+07:00"
                    },
                    {
                        "created_at": "2020-05-15T06:47:50.658+07:00",
                        "document_name": "load_line_certificate",
                        "expired": false,
                        "expired_at": "2020-06-30T00:00:00.000+07:00",
                        "file": "http://localhost:3000/uploads/tug/1/load_line_certificate.pdf",
                        "id": 26,
                        "released_at": null,
                        "remark": null,
                        "status": "waiting",
                        "updated_at": "2020-05-15T06:47:50.658+07:00"
                    },
                    {
                        "created_at": "2020-05-15T06:47:52.046+07:00",
                        "document_name": "css_construction_certificate",
                        "expired": false,
                        "expired_at": "2020-06-30T00:00:00.000+07:00",
                        "file": "http://localhost:3000/uploads/tug/1/css_construction_certificate.pdf",
                        "id": 27,
                        "released_at": null,
                        "remark": null,
                        "status": "waiting",
                        "updated_at": "2020-05-15T06:47:52.046+07:00"
                    },
                    {
                        "created_at": "2020-05-15T06:47:53.416+07:00",
                        "document_name": "css_equipment_certificate",
                        "expired": false,
                        "expired_at": "2020-06-30T00:00:00.000+07:00",
                        "file": "http://localhost:3000/uploads/tug/1/css_equipment_certificate.pdf",
                        "id": 28,
                        "released_at": null,
                        "remark": null,
                        "status": "waiting",
                        "updated_at": "2020-05-15T06:47:53.416+07:00"
                    },
                    {
                        "created_at": "2020-05-15T06:47:55.391+07:00",
                        "document_name": "css_safety_radio_certificate",
                        "expired": false,
                        "expired_at": "2020-06-30T00:00:00.000+07:00",
                        "file": "http://localhost:3000/uploads/tug/1/css_safety_radio_certificate.pdf",
                        "id": 29,
                        "released_at": null,
                        "remark": null,
                        "status": "waiting",
                        "updated_at": "2020-05-15T06:47:55.391+07:00"
                    },
                    {
                        "created_at": "2020-05-15T06:47:57.568+07:00",
                        "document_name": "iopp_certificate",
                        "expired": false,
                        "expired_at": "2020-06-30T00:00:00.000+07:00",
                        "file": "http://localhost:3000/uploads/tug/1/iopp_certificate.pdf",
                        "id": 30,
                        "released_at": null,
                        "remark": null,
                        "status": "waiting",
                        "updated_at": "2020-05-15T06:47:57.568+07:00"
                    },
                    {
                        "created_at": "2020-05-15T06:47:59.246+07:00",
                        "document_name": "hm_insurance",
                        "expired": false,
                        "expired_at": "2020-06-30T00:00:00.000+07:00",
                        "file": "http://localhost:3000/uploads/tug/1/hm_insurance.pdf",
                        "id": 31,
                        "released_at": null,
                        "remark": null,
                        "status": "waiting",
                        "updated_at": "2020-05-15T06:47:59.246+07:00"
                    },
                    {
                        "created_at": "2020-05-15T06:48:01.004+07:00",
                        "document_name": "pi_insurance",
                        "expired": false,
                        "expired_at": "2020-06-30T00:00:00.000+07:00",
                        "file": "http://localhost:3000/uploads/tug/1/pi_insurance.pdf",
                        "id": 32,
                        "released_at": null,
                        "remark": null,
                        "status": "waiting",
                        "updated_at": "2020-05-15T06:48:01.004+07:00"
                    },
                    {
                        "created_at": "2020-05-15T06:48:02.156+07:00",
                        "document_name": "minimum_safe_manning_certificate",
                        "expired": false,
                        "expired_at": "2020-06-30T00:00:00.000+07:00",
                        "file": "http://localhost:3000/uploads/tug/1/minimum_safe_manning_certificate.pdf",
                        "id": 33,
                        "released_at": null,
                        "remark": null,
                        "status": "waiting",
                        "updated_at": "2020-05-15T06:48:02.156+07:00"
                    },
                    {
                        "created_at": "2020-05-15T06:48:04.069+07:00",
                        "document_name": "radio_station_certificate",
                        "expired": false,
                        "expired_at": "2020-06-30T00:00:00.000+07:00",
                        "file": "http://localhost:3000/uploads/tug/1/radio_station_certificate.pdf",
                        "id": 34,
                        "released_at": null,
                        "remark": null,
                        "status": "waiting",
                        "updated_at": "2020-05-15T06:48:04.069+07:00"
                    },
                    {
                        "created_at": "2020-05-15T06:48:05.944+07:00",
                        "document_name": "certificate_of_registry",
                        "expired": false,
                        "expired_at": "2020-06-30T00:00:00.000+07:00",
                        "file": "http://localhost:3000/uploads/tug/1/certificate_of_registry.pdf",
                        "id": 35,
                        "released_at": null,
                        "remark": null,
                        "status": "waiting",
                        "updated_at": "2020-05-15T06:48:05.944+07:00"
                    },
                    {
                        "created_at": "2020-05-15T06:48:07.605+07:00",
                        "document_name": "ship_sanitation_certificate",
                        "expired": false,
                        "expired_at": "2020-06-30T00:00:00.000+07:00",
                        "file": "http://localhost:3000/uploads/tug/1/ship_sanitation_certificate.pdf",
                        "id": 36,
                        "released_at": null,
                        "remark": null,
                        "status": "waiting",
                        "updated_at": "2020-05-15T06:48:07.605+07:00"
                    },
                    {
                        "created_at": "2020-05-15T06:48:10.849+07:00",
                        "document_name": "inflatable_liferaft_certificate",
                        "expired": false,
                        "expired_at": "2020-06-30T00:00:00.000+07:00",
                        "file": "http://localhost:3000/uploads/tug/1/inflatable_liferaft_certificate.pdf",
                        "id": 38,
                        "released_at": null,
                        "remark": null,
                        "status": "waiting",
                        "updated_at": "2020-05-15T06:48:10.849+07:00"
                    },
                    {
                        "created_at": "2020-05-15T06:48:12.257+07:00",
                        "document_name": "ship_certificate_of_medicine_chest",
                        "expired": false,
                        "expired_at": "2020-06-30T00:00:00.000+07:00",
                        "file": "http://localhost:3000/uploads/tug/1/ship_certificate_of_medicine_chest.pdf",
                        "id": 39,
                        "released_at": null,
                        "remark": null,
                        "status": "waiting",
                        "updated_at": "2020-05-15T06:48:12.257+07:00"
                    },
                    {
                        "created_at": "2020-05-15T06:48:14.035+07:00",
                        "document_name": "clc_bunker",
                        "expired": false,
                        "expired_at": "2020-06-30T00:00:00.000+07:00",
                        "file": "http://localhost:3000/uploads/tug/1/clc_bunker.pdf",
                        "id": 40,
                        "released_at": null,
                        "remark": null,
                        "status": "waiting",
                        "updated_at": "2020-05-15T06:48:14.035+07:00"
                    },
                    {
                        "created_at": "2020-05-15T06:48:09.484+07:00",
                        "document_name": "stability_booked",
                        "expired": false,
                        "expired_at": null,
                        "file": "http://localhost:3000/uploads/tug/1/stability_booked.pdf",
                        "id": 37,
                        "released_at": null,
                        "remark": null,
                        "status": "waiting",
                        "updated_at": "2020-05-23T13:26:50.244+07:00"
                    },
                    {
                        "created_at": "2020-05-15T06:47:41.933+07:00",
                        "document_name": "international_tonnage_certificate",
                        "expired": false,
                        "expired_at": "2020-06-30T00:00:00.000+07:00",
                        "file": "http://localhost:3000/uploads/tug/1/international_tonnage_certificate.pdf",
                        "id": 21,
                        "released_at": null,
                        "remark": null,
                        "status": "waiting",
                        "updated_at": "2020-05-18T18:40:22.691+07:00"
                    },
                    {
                        "created_at": "2020-05-19T11:33:35.136+07:00",
                        "document_name": "charter_document",
                        "expired": false,
                        "expired_at": null,
                        "file": "http://localhost:3000/uploads/tug/1/charter_document.pdf",
                        "id": 72,
                        "released_at": null,
                        "remark": null,
                        "status": "waiting",
                        "updated_at": "2020-05-19T22:18:57.431+07:00"
                    }
                ],
                "photos": [
                    {
                        "created_at": "2020-05-23T09:28:16.926+07:00",
                        "expired": false,
                        "expired_at": null,
                        "id": 6,
                        "image": "http://localhost:3000/uploads/tug/1/front_view.jpg",
                        "remark": null,
                        "status": "waiting",
                        "updated_at": "2020-05-23T09:28:16.926+07:00",
                        "viewpoint": "front_view"
                    },
                    {
                        "created_at": "2020-05-23T09:28:16.992+07:00",
                        "expired": false,
                        "expired_at": null,
                        "id": 7,
                        "image": "http://localhost:3000/uploads/tug/1/rear_view.jpg",
                        "remark": null,
                        "status": "waiting",
                        "updated_at": "2020-05-23T13:23:28.141+07:00",
                        "viewpoint": "rear_view"
                    },
                    {
                        "created_at": "2020-05-23T09:28:17.020+07:00",
                        "expired": false,
                        "expired_at": null,
                        "id": 8,
                        "image": "http://localhost:3000/uploads/tug/1/top_view.jpg",
                        "remark": null,
                        "status": "waiting",
                        "updated_at": "2020-05-23T09:28:17.020+07:00",
                        "viewpoint": "top_view"
                    },
                    {
                        "created_at": "2020-05-23T09:28:17.062+07:00",
                        "expired": false,
                        "expired_at": null,
                        "id": 9,
                        "image": "http://localhost:3000/uploads/tug/1/left_side_view.jpg",
                        "remark": null,
                        "status": "waiting",
                        "updated_at": "2020-05-23T09:28:17.062+07:00",
                        "viewpoint": "left_side_view"
                    },
                    {
                        "created_at": "2020-05-23T09:28:17.099+07:00",
                        "expired": false,
                        "expired_at": null,
                        "id": 10,
                        "image": "http://localhost:3000/uploads/tug/1/right_side_view.jpg",
                        "remark": null,
                        "status": "waiting",
                        "updated_at": "2020-05-23T09:28:17.099+07:00",
                        "viewpoint": "right_side_view"
                    }
                ],
                "general": {
                    "name": "Tiong Woon Ocean 19",
                    "nationality": "Singapore",
                    "ship_class": "BV",
                    "call_sign": "9V5496",
                    "imo_number": "9554999",
                    "year_of_built": 2009
                },
                "dimension": {
                    "length": 36.0,
                    "breadth": 10.4,
                    "depth": 5.0,
                    "draught": 4.0,
                    "grt": 453,
                    "nrt": 135,
                    "dwt": 135
                },
                "engine": {
                    "main_model": "Cummings KTA",
                    "main_quantity": 2,
                    "main_bhp": 1600,
                    "aux_model": "Cummings KTA",
                    "aux_quantity": 1,
                    "aux_bhp": 800
                },
                "specific": null,
                "other_equipment": {
                    "anchor_winch": true,
                    "towing_hook": true,
                    "tire_fender": true,
                    "pump": false,
                    "control_panel": true,
                    "anchor": true
                },
                "document": {
                    "international_tonnage_certificate": "http://localhost:3000/uploads/tug/1/international_tonnage_certificate.pdf",
                    "international_tonnage_certificate_expiry": "2020-06-30",
                    "nationality_certificate": "http://localhost:3000/uploads/tug/1/nationality_certificate.pdf",
                    "nationality_certificate_expiry": "2020-06-30",
                    "rpk_certificate": "http://localhost:3000/uploads/tug/1/rpk_certificate.pdf",
                    "rpk_certificate_expiry": "2020-06-30",
                    "hull_certificate": "http://localhost:3000/uploads/tug/1/hull_certificate.pdf",
                    "hull_certificate_expiry": "2020-06-30",
                    "machinery_certificate": "http://localhost:3000/uploads/tug/1/machinery_certificate.pdf",
                    "machinery_certificate_expiry": "2020-06-30",
                    "load_line_certificate": "http://localhost:3000/uploads/tug/1/load_line_certificate.pdf",
                    "load_line_certificate_expiry": "2020-06-30",
                    "css_construction_certificate": "http://localhost:3000/uploads/tug/1/css_construction_certificate.pdf",
                    "css_construction_certificate_expiry": "2020-06-30",
                    "css_equipment_certificate": "http://localhost:3000/uploads/tug/1/css_equipment_certificate.pdf",
                    "css_equipment_certificate_expiry": "2020-06-30",
                    "css_safety_radio_certificate": "http://localhost:3000/uploads/tug/1/css_safety_radio_certificate.pdf",
                    "css_safety_radio_certificate_expiry": "2020-06-30",
                    "iopp_certificate": "http://localhost:3000/uploads/tug/1/iopp_certificate.pdf",
                    "iopp_certificate_expiry": "2020-06-30",
                    "hm_insurance": "http://localhost:3000/uploads/tug/1/hm_insurance.pdf",
                    "hm_insurance_expiry": "2020-06-30",
                    "pi_insurance": "http://localhost:3000/uploads/tug/1/pi_insurance.pdf",
                    "pi_insurance_expiry": "2020-06-30",
                    "minimum_safe_manning_certificate": "http://localhost:3000/uploads/tug/1/minimum_safe_manning_certificate.pdf",
                    "minimum_safe_manning_certificate_expiry": "2020-06-30",
                    "radio_station_certificate": "http://localhost:3000/uploads/tug/1/radio_station_certificate.pdf",
                    "radio_station_certificate_expiry": "2020-06-30",
                    "certificate_of_registry": "http://localhost:3000/uploads/tug/1/certificate_of_registry.pdf",
                    "certificate_of_registry_expiry": "2020-06-30",
                    "ship_sanitation_certificate": "http://localhost:3000/uploads/tug/1/ship_sanitation_certificate.pdf",
                    "ship_sanitation_certificate_expiry": "2020-06-30",
                    "stability_booked": "http://localhost:3000/uploads/tug/1/stability_booked.pdf",
                    "inflatable_liferaft_certificate": "http://localhost:3000/uploads/tug/1/inflatable_liferaft_certificate.pdf",
                    "inflatable_liferaft_certificate_expiry": "2020-06-30",
                    "ship_certificate_of_medicine_chest": "http://localhost:3000/uploads/tug/1/ship_certificate_of_medicine_chest.pdf",
                    "ship_certificate_of_medicine_chest_expiry": "2020-06-30",
                    "clc_bunker": "http://localhost:3000/uploads/tug/1/clc_bunker.pdf",
                    "clc_bunker_expiry": "2020-06-30"
                },
                "photo": {
                    "front_view": "http://localhost:3000/uploads/tug/1/front_view.jpg?1590199748",
                    "front_view_upload_date": "2020-05-23T09:09:08.404+07:00",
                    "rear_view": "http://localhost:3000/uploads/tug/1/rear_view.jpg?1590199748",
                    "rear_view_upload_date": "2020-05-15T06:45:52.974+07:00",
                    "left_side_view": "http://localhost:3000/uploads/tug/1/left_side_view.jpg?1590199748",
                    "left_side_view_upload_date": "2020-05-15T06:46:01.656+07:00",
                    "right_side_view": "http://localhost:3000/uploads/tug/1/right_side_view.jpg?1590199748",
                    "right_side_view_upload_date": "2020-05-15T06:46:10.671+07:00",
                    "top_view": "http://localhost:3000/uploads/tug/1/top_view.jpg?1590199748",
                    "top_view_upload_date": "2020-05-15T06:46:19.876+07:00"
                }
            },
            "barge": {
                "id": 1,
                "documents": [
                    {
                        "created_at": "2020-05-15T06:48:41.214+07:00",
                        "document_name": "rpk_certificate",
                        "expired": false,
                        "expired_at": "2020-06-30T00:00:00.000+07:00",
                        "file": "http://localhost:3000/uploads/barge/1/rpk_certificate.pdf",
                        "id": 43,
                        "released_at": null,
                        "remark": null,
                        "status": "waiting",
                        "updated_at": "2020-05-15T06:48:41.214+07:00"
                    },
                    {
                        "created_at": "2020-05-15T06:48:43.983+07:00",
                        "document_name": "load_line_certificate",
                        "expired": false,
                        "expired_at": "2020-06-30T00:00:00.000+07:00",
                        "file": "http://localhost:3000/uploads/barge/1/load_line_certificate.pdf",
                        "id": 45,
                        "released_at": null,
                        "remark": null,
                        "status": "waiting",
                        "updated_at": "2020-05-15T06:48:43.983+07:00"
                    },
                    {
                        "created_at": "2020-05-15T06:48:45.312+07:00",
                        "document_name": "css_construction_certificate",
                        "expired": false,
                        "expired_at": "2020-06-30T00:00:00.000+07:00",
                        "file": "http://localhost:3000/uploads/barge/1/css_construction_certificate.pdf",
                        "id": 46,
                        "released_at": null,
                        "remark": null,
                        "status": "waiting",
                        "updated_at": "2020-05-15T06:48:45.312+07:00"
                    },
                    {
                        "created_at": "2020-05-15T06:48:46.631+07:00",
                        "document_name": "hm_insurance",
                        "expired": false,
                        "expired_at": "2020-06-30T00:00:00.000+07:00",
                        "file": "http://localhost:3000/uploads/barge/1/hm_insurance.pdf",
                        "id": 47,
                        "released_at": null,
                        "remark": null,
                        "status": "waiting",
                        "updated_at": "2020-05-15T06:48:46.631+07:00"
                    },
                    {
                        "created_at": "2020-05-15T06:48:47.786+07:00",
                        "document_name": "pi_insurance",
                        "expired": false,
                        "expired_at": "2020-06-30T00:00:00.000+07:00",
                        "file": "http://localhost:3000/uploads/barge/1/pi_insurance.pdf",
                        "id": 48,
                        "released_at": null,
                        "remark": null,
                        "status": "waiting",
                        "updated_at": "2020-05-15T06:48:47.786+07:00"
                    },
                    {
                        "created_at": "2020-05-15T06:48:49.071+07:00",
                        "document_name": "certificate_of_registry",
                        "expired": false,
                        "expired_at": "2020-06-30T00:00:00.000+07:00",
                        "file": "http://localhost:3000/uploads/barge/1/certificate_of_registry.pdf",
                        "id": 49,
                        "released_at": null,
                        "remark": null,
                        "status": "waiting",
                        "updated_at": "2020-05-15T06:48:49.071+07:00"
                    },
                    {
                        "created_at": "2020-05-15T06:48:50.487+07:00",
                        "document_name": "ship_sanitation_certificate",
                        "expired": false,
                        "expired_at": "2020-06-30T00:00:00.000+07:00",
                        "file": "http://localhost:3000/uploads/barge/1/ship_sanitation_certificate.pdf",
                        "id": 50,
                        "released_at": null,
                        "remark": null,
                        "status": "waiting",
                        "updated_at": "2020-05-15T06:48:50.487+07:00"
                    },
                    {
                        "created_at": "2020-05-15T06:48:51.733+07:00",
                        "document_name": "stability_booked",
                        "expired": false,
                        "expired_at": null,
                        "file": "http://localhost:3000/uploads/barge/1/stability_booked.pdf",
                        "id": 51,
                        "released_at": null,
                        "remark": null,
                        "status": "waiting",
                        "updated_at": "2020-05-15T06:48:51.733+07:00"
                    },
                    {
                        "created_at": "2020-05-15T06:48:39.869+07:00",
                        "document_name": "nationality_certificate",
                        "expired": false,
                        "expired_at": "2020-06-30T00:00:00.000+07:00",
                        "file": "http://localhost:3000/uploads/barge/1/nationality_certificate.pdf",
                        "id": 42,
                        "released_at": null,
                        "remark": null,
                        "status": "waiting",
                        "updated_at": "2020-05-18T14:56:52.231+07:00"
                    },
                    {
                        "created_at": "2020-05-15T06:48:38.576+07:00",
                        "document_name": "international_tonnage_certificate",
                        "expired": false,
                        "expired_at": "2020-06-30T00:00:00.000+07:00",
                        "file": "http://localhost:3000/uploads/barge/1/international_tonnage_certificate.pdf",
                        "id": 41,
                        "released_at": null,
                        "remark": null,
                        "status": "waiting",
                        "updated_at": "2020-05-23T10:07:59.427+07:00"
                    },
                    {
                        "created_at": "2020-05-15T06:48:42.523+07:00",
                        "document_name": "hull_certificate",
                        "expired": false,
                        "expired_at": "2020-06-30T00:00:00.000+07:00",
                        "file": "http://localhost:3000/uploads/barge/1/hull_certificate.pdf",
                        "id": 44,
                        "released_at": null,
                        "remark": null,
                        "status": "waiting",
                        "updated_at": "2020-05-18T10:48:05.038+07:00"
                    }
                ],
                "photos": [
                    {
                        "created_at": "2020-05-23T09:28:32.379+07:00",
                        "expired": false,
                        "expired_at": null,
                        "id": 11,
                        "image": "http://localhost:3000/uploads/barge/1/front_view.jpg",
                        "remark": null,
                        "status": "waiting",
                        "updated_at": "2020-05-23T09:28:32.379+07:00",
                        "viewpoint": "front_view"
                    },
                    {
                        "created_at": "2020-05-23T09:28:32.437+07:00",
                        "expired": false,
                        "expired_at": null,
                        "id": 12,
                        "image": "http://localhost:3000/uploads/barge/1/rear_view.jpg",
                        "remark": null,
                        "status": "waiting",
                        "updated_at": "2020-05-23T10:06:17.827+07:00",
                        "viewpoint": "rear_view"
                    },
                    {
                        "created_at": "2020-05-23T09:28:32.464+07:00",
                        "expired": false,
                        "expired_at": null,
                        "id": 13,
                        "image": "http://localhost:3000/uploads/barge/1/top_view.jpg",
                        "remark": null,
                        "status": "waiting",
                        "updated_at": "2020-05-23T09:28:32.464+07:00",
                        "viewpoint": "top_view"
                    },
                    {
                        "created_at": "2020-05-23T09:28:32.490+07:00",
                        "expired": false,
                        "expired_at": null,
                        "id": 14,
                        "image": "http://localhost:3000/uploads/barge/1/left_side_view.jpg",
                        "remark": null,
                        "status": "waiting",
                        "updated_at": "2020-05-23T09:28:32.490+07:00",
                        "viewpoint": "left_side_view"
                    },
                    {
                        "created_at": "2020-05-23T09:28:32.516+07:00",
                        "expired": false,
                        "expired_at": null,
                        "id": 15,
                        "image": "http://localhost:3000/uploads/barge/1/right_side_view.jpg",
                        "remark": null,
                        "status": "waiting",
                        "updated_at": "2020-05-23T09:28:32.516+07:00",
                        "viewpoint": "right_side_view"
                    }
                ],
                "general": {
                    "name": "Tiong Woon 31",
                    "nationality": "Singapore",
                    "ship_class": "BV",
                    "year_of_built": 2007
                },
                "dimension": {
                    "length": 40.97,
                    "breadth": 12.19,
                    "depth": 2.44,
                    "draught": 1.84,
                    "grt": 302,
                    "nrt": 91,
                    "dwt": 660
                },
                "engine": null,
                "specific": {
                    "side_door_ps": true,
                    "side_door_stbs": true,
                    "forepeak_door": true,
                    "forepeak_rampdoor": true,
                    "cargo_capacity": 660
                },
                "other_equipment": {
                    "anchor_winch": true,
                    "tire_fender": false,
                    "anchor": true,
                    "anchor_wire": true
                },
                "document": {
                    "international_tonnage_certificate": "http://localhost:3000/uploads/barge/1/international_tonnage_certificate.pdf",
                    "international_tonnage_certificate_expiry": "2020-06-30",
                    "nationality_certificate": "http://localhost:3000/uploads/barge/1/nationality_certificate.pdf",
                    "nationality_certificate_expiry": "2020-06-30",
                    "rpk_certificate": "http://localhost:3000/uploads/barge/1/rpk_certificate.pdf",
                    "rpk_certificate_expiry": "2020-06-30",
                    "hull_certificate": "http://localhost:3000/uploads/barge/1/hull_certificate.pdf",
                    "hull_certificate_expiry": "2020-06-30",
                    "load_line_certificate": "http://localhost:3000/uploads/barge/1/load_line_certificate.pdf",
                    "load_line_certificate_expiry": "2020-06-30",
                    "css_construction_certificate": "http://localhost:3000/uploads/barge/1/css_construction_certificate.pdf",
                    "css_construction_certificate_expiry": "2020-06-30",
                    "hm_insurance": "http://localhost:3000/uploads/barge/1/hm_insurance.pdf",
                    "hm_insurance_expiry": "2020-06-30",
                    "pi_insurance": "http://localhost:3000/uploads/barge/1/pi_insurance.pdf",
                    "pi_insurance_expiry": "2020-06-30",
                    "certificate_of_registry": "http://localhost:3000/uploads/barge/1/certificate_of_registry.pdf",
                    "certificate_of_registry_expiry": "2020-06-30",
                    "ship_sanitation_certificate": "http://localhost:3000/uploads/barge/1/ship_sanitation_certificate.pdf",
                    "ship_sanitation_certificate_expiry": "2020-06-30",
                    "stability_booked": "http://localhost:3000/uploads/barge/1/stability_booked.pdf"
                },
                "photo": {
                    "front_view": "http://localhost:3000/uploads/barge/1/front_view.jpg",
                    "front_view_upload_date": "2020-05-15T06:45:48.980+07:00",
                    "rear_view": "http://localhost:3000/uploads/barge/1/rear_view.jpg",
                    "rear_view_upload_date": "2020-05-23T09:38:39.857+07:00",
                    "left_side_view": "http://localhost:3000/uploads/barge/1/left_side_view.jpg",
                    "left_side_view_upload_date": "2020-05-15T06:46:05.755+07:00",
                    "right_side_view": "http://localhost:3000/uploads/barge/1/right_side_view.jpg",
                    "right_side_view_upload_date": "2020-05-15T06:46:14.320+07:00",
                    "top_view": "http://localhost:3000/uploads/barge/1/top_view.jpg",
                    "top_view_upload_date": "2020-05-15T06:46:23.824+07:00"
                }
            }
        },
        "ship_particular": null
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment