{
	"name": "table/external/moloni/order/order_row.json",
	"table_name": "order_row",
	"table_prefix": "ordr",
	"record_type": ["purchase"],
	"local_table": "order_row",
	"local_record_type": "purchase",
	"default_field": "table/default_field.json",
	"field": [
		{
			"field_name": "order",
			"field_type": "integer",
			"local_field": "order_id",
			"writeable": false
		},
		{
			"field_name": "product_id",
			"field_type": "integer",
			"local_field": "json_data.moloni.product_id"
		},
		{
			"field_name": "name",
			"field_type": "varchar",
			"local_field": "description"
		},
		{
			"field_name": "price",
			"field_type": "double",
			"local_field": "unit_price"
		},
		{
			"field_name": "reference",
			"field_type": "varchar",
			"local_field": "product_id"
		},
		{
			"field_name": "qty",
			"field_type": "double",
			"local_field": "order_amount"
		},
		{
			"field_name": "exemption_reason",
			"field_type": "varchar",
			"local_field": "json_data.moloni.exemption_reason"
		}
	],
	"fields_not_in_use": [
		{
			"field_name": "name",
			"field_type": "varchar",
			"local_field": "json_data.moloni.product_name"
		},
		{
			"field_name": "category_id",
			"field_type": "integer",
			"local_field": "json_data.moloni.category_id"
		}
	],
	"example_data": {
		"products": [
			{
				"ean": "2211619",
				"origin_id": 0,
				"order": 1,
				"product_id": 29878027,
				"category_id": 1179257,
				"reference": "TU_VEISMIQSFL",
				"name": "BOAT SEAT MINI QUICKSILVER 2211619",
				"summary": "",
				"price": 113.101,
				"price_class_id": 0,
				"unit_id": 647438,
				"unit_name": "Unidade",
				"unit_short_name": "Uni.",
				"discount": 0,
				"qty": 1,
				"exemption_reason": "M20",
				"deduction_id": 0,
				"deduction": 0,
				"deduction_name": "",
				"properties": "",
				"is_related": 0,
				"supplier": {
					"supplier_id": 644095,
					"number": "1",
					"name": "VA-VARUSTE POLAND Sp. z o.o.",
					"vat": "PL5213645628"
				},
				"taxes": []
			}
		]
	}
}
