module.exports.getAssetComponentList = async (req, res) => { console.log('===== POST getAssetComponentList =====') console.log('url', req.originalUrl); console.log('headers', req.headers); console.log('query', req.query); console.log('params', req.params); console.log('body', req.body); let responseErr = { "code": "5000", "msg": "Error bind json to model" } let response = { "code": "0", "msg": "Success", "transID": "610d300c-f33c-4aa7-b640-bcddff7d7ddf", "assetComponentList": [ { "assetRowID": "1-7STT9PJ", "parAssetRowID": "1-6XIP5UU", "rootAssetRowID": "1-6XIP5UU", "assetNo": "CDC1392733125643171516804", "partNum": "CD_12564317", "offerCode": "BSP014", "offerName": "BSP014-Advance payment-Advance payment", "productRowID": "1-H2Y-65", "productCategory": "External", "productName": "12564317-BSP014", "productType": "Discount", "productLine": "True Mobile", "effectiveDate": "2020-04-21T18:40:55.000+0700", "expiryDate": "2020-09-06T00:00:00.000+0700", "status": "Inactive", "offerType": "Discount", "chargePeriod": "Monthly" }, { "assetRowID": "1-7KISY7T", "parAssetRowID": "1-6XIP5UU", "rootAssetRowID": "1-6XIP5UU", "assetNo": "COC1392733134135251488290", "partNum": "CO_13413525", "offerCode": "BUA3GS58", "offerName": "BUA3GS58-Free Net 12GB/month for 12 months-Free Net 12GB/month for 12 months", "productRowID": "1-1HFW-680", "productCategory": "External", "productName": "13413525-BUA3GS58", "productType": "SOC/OFFER", "productLine": "True Mobile", "effectiveDate": "2020-03-26T14:05:25.000+0700", "expiryDate": "2021-04-09T23:59:59.000+0700", "status": "Inactive" }, { "assetRowID": "1-7KISY7X", "parAssetRowID": "1-6XIP5UU", "rootAssetRowID": "1-6XIP5UU", "assetNo": "COC1392733162240291488289", "partNum": "CO_16224029", "offerCode": "RMV000000010410", "offerName": "RMV000000010410-PRP_Proactive Voluntary Contract 12 months", "productRowID": "1-1UPI-49", "productCategory": "External", "productName": "16224029-RMV000000010410", "productType": "SOC/OFFER", "productLine": "True Mobile", "effectiveDate": "2020-03-26T14:05:15.000+0700", "expiryDate": "2021-03-26T14:05:10.000+0700", "status": "Inactive" }, { "assetRowID": "1-7KHPX3D", "parAssetRowID": "1-6XIP5UU", "rootAssetRowID": "1-6XIP5UU", "assetNo": "COC1392733136578271487938", "partNum": "CO_13657827", "offerCode": "BUNV1S41", "offerName": "BUNV1S41-Free Voice all-net100mins/12M-Free Voice call100mins for 12months", "productRowID": "1-1HG8-34", "productCategory": "External", "productName": "13657827-BUNV1S41", "productType": "SOC/OFFER", "productLine": "True Mobile", "effectiveDate": "2020-03-26T11:04:29.000+0700", "expiryDate": "2021-04-26T00:00:00.000+0700", "status": "Inactive" }, { "assetRowID": "1-75Y4CQP", "parAssetRowID": "1-6XIP5UU", "rootAssetRowID": "1-6XIP5UU", "assetNo": "COC1392733125180251452980", "partNum": "CO_12518025", "offerCode": "RETENS83", "offerName": "RETENS83-RET_Free Voice all-net550mins 6Months-Free Voice all-net550mins 6Months", "productRowID": "1-177N-136", "productCategory": "External", "productName": "12518025-RETENS83", "productType": "SOC/OFFER", "productLine": "True Mobile", "effectiveDate": "2020-02-06T17:25:44.000+0700", "expiryDate": "2020-08-06T00:00:00.000+0700", "status": "Inactive" }, { "assetRowID": "1-75N9HNZ", "parAssetRowID": "1-6XIP5UU", "rootAssetRowID": "1-6XIP5UU", "assetNo": "COC1392733415811440976", "partNum": "CO_41581", "offerCode": "PROINTL1", "offerName": "PROINTL1-International Call Enabling-International Call Enabling", "productRowID": "1-1TH-1866", "productCategory": "External", "productName": "41581-PROINTL1", "productType": "SOC/OFFER", "productLine": "True Mobile", "effectiveDate": "2020-01-21T16:00:27.000+0700", "status": "Active" }, { "assetRowID": "1-75N9HNN", "parAssetRowID": "1-6XIP5UU", "rootAssetRowID": "1-6XIP5UU", "assetNo": "COC13927331056451440977", "partNum": "CO_105645", "offerCode": "PROROAM2S", "offerName": "PROROAM2S-Postpaid Roaming Limited Data Coverage-Provision - Postpay Roaming Limited Data Coverage", "productRowID": "1-1TH-1608", "productCategory": "External", "productName": "105645-PROROAM2S", "productType": "SOC/OFFER", "productLine": "True Mobile", "effectiveDate": "2020-01-21T16:00:27.000+0700", "expiryDate": "2020-01-30T18:42:42.000+0700", "status": "Inactive" }, { "assetRowID": "1-7P3ONX4", "parAssetRowID": "1-6XIP5UU", "rootAssetRowID": "1-6XIP5UU", "assetNo": "COC1392733161593291439753", "partNum": "CO_16159329", "offerCode": "NOAHTS08", "offerName": "NOAHTS08-TrueID TV box Service fee 50 Baht recurring-TrueID TV Box Service fee", "productRowID": "1-1UQ9-103", "productCategory": "External", "productName": "16159329-NOAHTS08", "productType": "SOC/OFFER", "productLine": "True Mobile", "effectiveDate": "2020-01-17T15:52:53.000+0700", "expiryDate": "2020-01-21T15:48:30.000+0700", "status": "Inactive" }, { "assetRowID": "1-7P3ONX8", "parAssetRowID": "1-6XIP5UU", "rootAssetRowID": "1-6XIP5UU", "assetNo": "COC1392733161593291438729", "partNum": "CO_16159329", "offerCode": "NOAHTS08", "offerName": "NOAHTS08-TrueID TV box Service fee 50 Baht recurring-TrueID TV Box Service fee", "productRowID": "1-1UQ9-103", "productCategory": "External", "productName": "16159329-NOAHTS08", "productType": "SOC/OFFER", "productLine": "True Mobile", "effectiveDate": "2020-01-16T12:09:26.000+0700", "expiryDate": "2020-01-17T15:48:49.000+0700", "status": "Inactive" }, { "assetRowID": "1-75N9HNR", "parAssetRowID": "1-6XIP5UU", "rootAssetRowID": "1-6XIP5UU", "assetNo": "COC1392733161009291438589", "partNum": "CO_16100929", "offerCode": "RMVC00000001901", "offerName": "RMVC00000001901-SH_Smart Employee_iPhone 7 32GB lock sim_Disc10510_NoAdv_c12", "productRowID": "1-1U2D-31", "productCategory": "External", "productName": "16100929-RMVC00000001901", "productType": "SOC/OFFER", "productLine": "True Mobile", "effectiveDate": "2020-01-16T11:05:13.000+0700", "expiryDate": "2020-02-05T17:33:23.000+0700", "status": "Inactive" }, { "assetRowID": "1-75N9HNJ", "parAssetRowID": "1-6XIP5UU", "rootAssetRowID": "1-6XIP5UU", "assetNo": "KNOX1392733201195782", "serialNo": "359440080055649", "productCode": "Product", "partNum": "KNOX", "offerName": "KNOX IMEI", "productRowID": "1-75L97ZY", "productCategory": "External", "productName": "KNOX IMEI", "productLine": "True Mobile", "effectiveDate": "2020-01-15T15:31:53.000+0700", "expiryDate": "2020-02-05T17:33:23.000+0700", "status": "Inactive", "installDate": "2020-01-15T07:00:00.000+0700" }, { "assetRowID": "1-7P3ONXC", "parAssetRowID": "1-6XIP5UU", "rootAssetRowID": "1-6XIP5UU", "assetNo": "COC1392733161593291437581", "partNum": "CO_16159329", "offerCode": "NOAHTS08", "offerName": "NOAHTS08-TrueID TV box Service fee 50 Baht recurring-TrueID TV Box Service fee", "productRowID": "1-1UQ9-103", "productCategory": "External", "productName": "16159329-NOAHTS08", "productType": "SOC/OFFER", "productLine": "True Mobile", "effectiveDate": "2020-01-15T14:45:14.000+0700", "expiryDate": "2020-01-16T12:01:08.000+0700", "status": "Inactive" }, { "assetRowID": "1-75N9HNV", "parAssetRowID": "1-6XIP5UU", "rootAssetRowID": "1-6XIP5UU", "assetNo": "COC1392733199911436448", "partNum": "CO_19991", "offerCode": "1331SS01", "offerName": "1331SS01-Free for 1331, 1242 and 1239-Free for 1331, 1242 and 1239", "productRowID": "1-1TH-1678", "productCategory": "External", "productName": "19991-1331SS01", "productType": "SOC/OFFER", "productLine": "True Mobile", "effectiveDate": "2020-01-13T15:53:40.000+0700", "status": "Active" }, { "assetRowID": "1-6XL4A3B", "parAssetRowID": "1-6XIP5UU", "rootAssetRowID": "1-6XIP5UU", "assetNo": "COC1392733140264271436086", "partNum": "CO_14026427", "offerCode": "RMV000000007991", "offerName": "RMV000000007991-SH_Galaxy KNOX_Disc3500_c12", "productRowID": "1-1N9O-200", "productCategory": "External", "productName": "14026427-RMV000000007991", "productType": "SOC/OFFER", "productLine": "True Mobile", "effectiveDate": "2020-01-09T18:19:28.000+0700", "expiryDate": "2020-02-05T17:33:23.000+0700", "status": "Inactive" }, { "assetRowID": "1-6XL4A3F", "parAssetRowID": "1-6XIP5UU", "rootAssetRowID": "1-6XIP5UU", "assetNo": "COC1392733140269271436085", "partNum": "CO_14026927", "offerCode": "RMV000000007996", "offerName": "RMV000000007996-NS_Galaxy KNOX_Disc4500_c12", "productRowID": "1-1J42-34", "productCategory": "External", "productName": "14026927-RMV000000007996", "productType": "SOC/OFFER", "productLine": "True Mobile", "effectiveDate": "2020-01-09T18:06:26.000+0700", "expiryDate": "2020-01-09T18:14:15.000+0700", "status": "Inactive" }, { "assetRowID": "1-6XIP5WN", "parAssetRowID": "1-6XIP5UU", "rootAssetRowID": "1-6XIP5UU", "assetNo": "COC1392733162101291436038", "partNum": "CO_16210129", "offerCode": "CUGFRS15", "offerName": "CUGFRS15-Close User Group (Free) - True Family Plus-CUG (Free) - True Family Plus", "productRowID": "1-1UPG-27", "productCategory": "External", "productName": "16210129-CUGFRS15", "productType": "SOC/OFFER", "productLine": "True Mobile", "effectiveDate": "2020-01-09T12:20:56.000+0700", "status": "Active", "offerType": "CUG" }, { "assetRowID": "1-6XIP5WJ", "parAssetRowID": "1-6XIP5UU", "rootAssetRowID": "1-6XIP5UU", "assetNo": "COC1392733161593291436037", "partNum": "CO_16159329", "offerCode": "NOAHTS08", "offerName": "NOAHTS08-TrueID TV box Service fee 50 Baht recurring-TrueID TV Box Service fee", "productRowID": "1-1UQ9-103", "productCategory": "External", "productName": "16159329-NOAHTS08", "productType": "SOC/OFFER", "productLine": "True Mobile", "effectiveDate": "2020-01-09T11:57:22.000+0700", "expiryDate": "2020-01-10T11:28:35.000+0700", "status": "Inactive" }, { "assetRowID": "1-6XIP5VZ", "parAssetRowID": "1-6XIP5UU", "rootAssetRowID": "1-6XIP5UU", "assetNo": "trueIDTV1392733201192647", "serialNo": "trueIDTV-108628999", "productCode": "Product", "partNum": "trueIDTV", "offerName": "True ID TV", "productRowID": "1-3W58I9A", "productCategory": "External", "productName": "True ID TV", "productType": "TVG", "productLine": "True Mobile", "effectiveDate": "2020-01-09T11:57:22.000+0700", "status": "Active", "installDate": "2020-01-09T07:00:00.000+0700" }, { "assetRowID": "1-6XIP5WV", "parAssetRowID": "1-6XIP5UU", "rootAssetRowID": "1-6XIP5UU", "assetNo": "COC1392733312621434698", "partNum": "CO_31262", "offerCode": "BALANCELIMIT", "offerName": "BALANCELIMIT-Spending limit offer", "productRowID": "1-1TH-1838", "productCategory": "External", "productName": "31262-BALANCELIMIT", "productType": "SOC/OFFER", "productLine": "True Mobile", "effectiveDate": "2020-01-07T17:41:47.000+0700", "status": "Active", "offerType": "BALANCELIMIT" }, { "assetRowID": "1-6XIP5WB", "parAssetRowID": "1-6XIP5UU", "rootAssetRowID": "1-6XIP5UU", "assetNo": "COC1392733131024251425627", "partNum": "CO_13102425", "offerCode": "ITMBLS02", "offerName": "ITMBLS02-Itemized e-Bill Service-Itemized e-Bill Service", "productRowID": "1-1EKZ-20", "productCategory": "External", "productName": "13102425-ITMBLS02", "productType": "SOC/OFFER", "productLine": "True Mobile", "effectiveDate": "2019-12-23T18:22:24.000+0700", "status": "Active" }, { "assetRowID": "1-6XIP5WF", "parAssetRowID": "1-6XIP5UU", "rootAssetRowID": "1-6XIP5UU", "assetNo": "COC1392733155109271425625", "partNum": "CO_15510927", "offerCode": "PROFCVBAR", "offerName": "PROFCVBAR-First Call Verification, Barring - Additional-First Call Verification, Barring", "productRowID": "1-1KFG-151", "productCategory": "External", "productName": "15510927-PROFCVBAR", "productType": "SOC/OFFER", "productLine": "True Mobile", "effectiveDate": "2019-12-23T18:22:16.000+0700", "status": "Active" }, { "assetRowID": "1-6XIP5W3", "parAssetRowID": "1-6XIP5UU", "rootAssetRowID": "1-6XIP5UU", "assetNo": "CPC13927332630381425619", "partNum": "CP_263038", "offerCode": "BUSTBP11", "offerName": "BUSTBP11-Biz ThuukJai RC 599 Get 1,100 min-Biz ThuukJai RC 599", "productRowID": "1-4WK-5763", "productCategory": "External", "productName": "263038-BUSTBP11", "productType": "Price Plan", "productLine": "True Mobile", "effectiveDate": "2019-12-23T18:10:57.000+0700", "expiryDate": "2020-02-06T00:00:00.000+0700", "status": "Inactive", "offerType": "Price Plan" }, { "assetRowID": "1-6XIP5VN", "parAssetRowID": "1-6XIP5UU", "rootAssetRowID": "1-6XIP5UU", "assetNo": "CSC1392733201186614", "serialNo": "896600401500004362", "partNum": "Mobile SIM Card", "offerName": "Mobile SIM Card", "productRowID": "1-1U5-1570", "productCategory": "External", "productName": "Mobile SIM Card", "productType": "SIM Card", "productLine": "True Mobile", "effectiveDate": "2019-12-23T18:10:57.000+0700", "status": "Active", "installDate": "2019-12-23T07:00:00.000+0700" }, { "assetRowID": "1-6XIP5VR", "parAssetRowID": "1-6XIP5UU", "rootAssetRowID": "1-6XIP5UU", "assetNo": "CIC1392733201186615", "serialNo": "520002000004362", "partNum": "Mobile IMSI", "offerName": "Mobile IMSI", "productRowID": "1-1U5-1954", "productCategory": "External", "productName": "Mobile IMSI", "productType": "IMSI", "productLine": "True Mobile", "effectiveDate": "2019-12-23T18:10:57.000+0700", "status": "Active", "installDate": "2019-12-23T07:00:00.000+0700" }, { "assetRowID": "1-6XIP5XB", "parAssetRowID": "1-6XIP5UU", "rootAssetRowID": "1-6XIP5UU", "assetNo": "COC1392733793331425623", "partNum": "CO_79333", "offerCode": "RMGPSS51", "offerName": "RMGPSS51-GPRS SpecialRate(PP)0.002 bt/KB,Cap1500-GPRS SpRate-PP 0.002 bt/KB,Cap1500", "productRowID": "1-1TH-2516", "productCategory": "External", "productName": "79333-RMGPSS51", "productType": "SOC/OFFER", "productLine": "True Mobile", "effectiveDate": "2019-12-23T18:10:57.000+0700", "status": "Active" }, { "assetRowID": "1-6XIP5X7", "parAssetRowID": "1-6XIP5UU", "rootAssetRowID": "1-6XIP5UU", "assetNo": "COC1392733417011425622", "partNum": "CO_41701", "offerCode": "RMPGPS01", "offerName": "RMPGPS01-GPRS Provisioning SOC - RMV (HMMS,HINTERNET)-GPRS Provisioning - HMMS,HINTERNET", "productRowID": "1-1TH-1872", "productCategory": "External", "productName": "41701-RMPGPS01", "productType": "SOC/OFFER", "productLine": "True Mobile", "effectiveDate": "2019-12-23T18:10:57.000+0700", "expiryDate": "2020-01-13T15:58:33.000+0700", "status": "Inactive" }, { "assetRowID": "1-6XIP5X3", "parAssetRowID": "1-6XIP5UU", "rootAssetRowID": "1-6XIP5UU", "assetNo": "COC1392733416411425621", "partNum": "CO_41641", "offerCode": "RMHSPS02", "offerName": "RMHSPS02-Hi-Speed 3G/EDGE/GPRS 21.5 Mbps - PostPay (rev 42)-3G/EDGE/GPRS 21.5Mbps(rev to42Mbps)", "productRowID": "1-1TH-1869", "productCategory": "External", "productName": "41641-RMHSPS02", "productType": "SOC/OFFER", "productLine": "True Mobile", "effectiveDate": "2019-12-23T18:10:57.000+0700", "status": "Active" }, { "assetRowID": "1-6XIP5WZ", "parAssetRowID": "1-6XIP5UU", "rootAssetRowID": "1-6XIP5UU", "assetNo": "COC1392733409411425620", "partNum": "CO_40941", "offerCode": "PROSTDA1", "offerName": "PROSTDA1-Standard Provisioning Services for Post Pay # 1-Standard Provisioning for Post Pay", "productRowID": "1-1TH-1860", "productCategory": "External", "productName": "40941-PROSTDA1", "productType": "SOC/OFFER", "productLine": "True Mobile", "effectiveDate": "2019-12-23T18:10:57.000+0700", "status": "Active" }, { "assetRowID": "1-6XIP5WR", "parAssetRowID": "1-6XIP5UU", "rootAssetRowID": "1-6XIP5UU", "assetNo": "COC1392733200611425624", "partNum": "CO_20061", "offerCode": "CREDITLIMIT", "offerName": "CREDITLIMIT-Credit Limit offer", "productRowID": "1-1TH-1682", "productCategory": "External", "productName": "20061-CREDITLIMIT", "productType": "SOC/OFFER", "productLine": "True Mobile", "effectiveDate": "2019-12-23T18:10:57.000+0700", "status": "Active" }, { "assetRowID": "1-6XIP5VV", "parAssetRowID": "1-6XIP5UU", "rootAssetRowID": "1-6XIP5UU", "assetNo": "CMC1392733201186616", "serialNo": "MSISDN-0968730341", "productCode": "Product", "partNum": "MSISDN", "offerName": "MSISDN", "productRowID": "1-1UK76M", "productCategory": "External", "productName": "MSISDN", "productType": "MSISDN", "productLine": "True Mobile", "effectiveDate": "2019-12-23T18:10:57.000+0700", "status": "Active", "installDate": "2019-12-23T07:00:00.000+0700" }, { "assetRowID": "1-6XIP5W7", "parAssetRowID": "1-6XIP5UU", "rootAssetRowID": "1-6XIP5UU", "assetNo": "COC1392733114044121425618", "partNum": "CO_11404412", "offerCode": "RMV000000001641", "offerName": "RMV000000001641-Change ownership", "productRowID": "1-E87-1413", "productCategory": "External", "productName": "11404412-RMV000000001641", "productType": "SOC/OFFER", "productLine": "True Mobile", "effectiveDate": "2019-12-23T18:10:57.000+0700", "status": "Active" } ] } res.status(200).send(response) }