{
	"name": "table/local/product/production_order.json",
	"table_name": "WorkOrdersTransfer",
	"table_prefix": "wo",
	"main_table-": "product",
	"record_type": [""],
	"local_table": "production_order",
	"local_record_type": "",
	"example_data": {
		"Id": 35,
		"Number": "00664",
		"Title": "00755",
		"ProductNumber": "104103",
		"ProductName": "Oulun Vesi Tervajärven RMK",
		"Quantity": 1.0,
		"SalesOrder": "170192",
		"Created": "2019-12-11 13:59:25.3933333 +00:00",
		"CreatedBy": "AJ DATA IMPORT FROM ERP",
		"ErpStatus": 0,
		"MesStatus": 0,
		"State": ""
	},
	"default_order": [],
	"save_script": [],
	"calculated_field": {},
	"field": [
		{
			"constraint": ["primary key"],
			"field_name": "Id",
			"field_type": "bigint",
			"writeable": false,
			"local_field": "json_data.id"
		},
		{
			"field_name": "Number",
			"local_field": "production_order_id",
			"field_type": "varchar"
		},
		{
			"field_name": "Title",
			"field_type": "varchar",
			"local_field": "json_data.production_order_number"
		},
		{
			"field_name": "ProductNumber",
			"local_field": "product_id",
			"field_type": "varchar"
		},
		{
			"field_name": "ProductName",
			"field_type": "varchar",
			"local_field": "json_data.product_name"
		},
		{
			"field_name": "Quantity",
			"local_field": "amount_to_produce",
			"field_type": "double"
		},
		{
			"field_name": "SalesOrder",
			"field_type": "varchar",
			"field_length": 450,
			"local_field": "sales_order_id",
			"foreign_key": [
				{
					"link_type": "do nothing",
					"linked_table": "SalesOrdersTransfer",
					"linked_record_type": "sales",
					"linked_field": "Number"
				}
			]
		},
		{
			"field_name": "Created",
			"field_type": "timestamp",
			"local_field": "create_time"
		},
		{
			"field_name": "CreatedBy",
			"field_type": "varchar",
			"local_field": "json_data.create_user"
		},
		{
			"field_name": "ErpStatus",
			"field_type": "integer",
			"local_field": "json_data.erp_status"
		},
		{
			"field_name": "MesStatus",
			"field_type": "integer",
			"local_field": "json_data.mes_status"
		},
		{
			"field_name": "State",
			"field_type": "varchar",
			"local_field": "production_order_state"
		}
	]
}
