{
	"name": "table/external/4d/product/stock_event.json",
	"table_name": "stock_event",
	"table_prefix": "st",
	"record_type": ["product"],
	"local_table": "stock",
	"local_record_type": "product",
	"table_number": 8,
	"field": [
		{
			"field_name": "amount__unit",
			"local_field": "amount",
			"field_type": "double",
			"field_number": 8,
			"constraint": ["index"]
		},
		{
			"field_name": "average_balance",
			"local_field": "json_data.average_balance",
			"field_type": "double",
			"field_number": 18
		},
		{
			"field_name": "average_price",
			"local_field": "json_data.average_price",
			"field_type": "double",
			"field_number": 19
		},
		{
			"field_name": "average_price_change_date",
			"local_field": "json_data.average_price_change_date",
			"field_type": "date",
			"field_number": 32
		},
		{
			"field_name": "change_id",
			"local_field": "modify_id",
			"field_type": "varchar",
			"field_length": 45,
			"field_number": 43,
			"length": 90,
			"constraint": ["index"]
		},
		{
			"field_name": "company_id",
			"local_field": "json_data.company_id",
			"field_type": "varchar",
			"field_length": 12,
			"field_number": 2,
			"length": 24,
			"constraint": ["index"],
			"foreign_key": [
				{
					"link_type": "prevent delete",
					"linked_field": "company_id",
					"linked_table": "company"
				}
			],
			"nullable": true
		},
		{
			"field_name": "cost_center",
			"local_field": "json_data.cost_center",
			"field_type": "varchar",
			"field_length": 80,
			"field_number": 29,
			"length": 160
		},
		{
			"field_name": "cost_price__unit",
			"local_field": "json_data.cost_price__unit",
			"field_type": "double",
			"field_number": 20
		},
		{
			"field_name": "creator_id",
			"local_field": "json_data.create_user",
			"field_type": "varchar",
			"field_length": 20,
			"field_number": 44,
			"length": 40
		},
		{
			"field_name": "currency_id",
			"local_field": "currency_id",
			"field_type": "varchar",
			"field_length": 6,
			"field_number": 23,
			"length": 12,
			"constraint": ["index"],
			"foreign_key": [
				{
					"link_type": "prevent delete",
					"linked_field": "currency_id",
					"linked_table": "currency"
				}
			],
			"nullable": true
		},
		{
			"field_name": "customer_project",
			"local_field": "json_data.customer_project",
			"field_type": "varchar",
			"field_length": 40,
			"field_number": 41,
			"length": 80
		},
		{
			"field_name": "date_",
			"local_field": "event_time",
			"field_type": "date",
			"field_number": 5,
			"constraint": ["index"]
		},
		{
			"field_name": "event_maker_id",
			"local_field": "json_data.event_maker_id",
			"field_type": "varchar",
			"field_length": 12,
			"field_number": 7,
			"length": 24,
			"constraint": ["index"],
			"foreign_key": [
				{
					"link_type": "prevent delete",
					"linked_field": "employee_id",
					"linked_table": "employee"
				}
			],
			"nullable": true
		},
		{
			"field_name": "exchange_rate",
			"local_field": "json_data.exchange_rate",
			"field_type": "double",
			"field_number": 25
		},
		{
			"field_name": "firm_id",
			"local_field": "json_data.firm_id",
			"field_type": "integer",
			"field_number": 27,
			"constraint": ["index"]
		},
		{
			"field_name": "foreign_price_change_date",
			"local_field": "json_data.foreign_price_change_date",
			"field_type": "date",
			"field_number": 30
		},
		{
			"field_name": "foreign_purchase_price",
			"local_field": "json_data.foreign_purchase_price",
			"field_type": "double",
			"field_number": 22
		},
		{
			"field_name": "info",
			"local_field": "info",
			"field_type": "text",
			"field_number": 12,
			"length": 0
		},
		{
			"field_name": "manufacturing_lot",
			"local_field": "json_data.manufacturing_lot",
			"field_type": "varchar",
			"field_length": 35,
			"field_number": 21,
			"length": 70,
			"constraint": ["index"]
		},
		{
			"field_name": "modifier_id",
			"local_field": "modify_user",
			"field_type": "varchar",
			"field_length": 20,
			"field_number": 45,
			"length": 40
		},
		{
			"field_name": "order_row",
			"local_field": "json_data.order_row",
			"field_type": "varchar",
			"field_length": 30,
			"field_number": 24,
			"length": 60,
			"constraint": ["index"]
		},
		{
			"field_name": "orderer_id",
			"local_field": "json_data.orderer_id",
			"field_type": "varchar",
			"field_length": 12,
			"field_number": 17,
			"length": 24
		},
		{
			"field_name": "price_confirmation",
			"local_field": "json_data.price_confirmation",
			"field_type": "integer",
			"field_number": 26,
			"constraint": ["index"]
		},
		{
			"field_name": "product_id",
			"local_field": "product_id",
			"field_type": "varchar",
			"field_length": 44,
			"field_number": 1,
			"length": 88,
			"constraint": ["index"],
			"foreign_key": [
				{
					"link_type": "prevent delete",
					"linked_field": "product_id",
					"linked_table": "product"
				}
			],
			"nullable": true
		},
		{
			"field_name": "project_id",
			"local_field": "json_data.project_id",
			"field_type": "varchar",
			"field_length": 40,
			"field_number": 42,
			"length": 80
		},
		{
			"field_name": "purch_avg_price_amount",
			"local_field": "json_data.purch_avg_price_amount",
			"field_type": "double",
			"field_number": 34
		},
		{
			"field_name": "purch_avg_price_change_date",
			"local_field": "json_data.purch_avg_price_change_date",
			"field_type": "date",
			"field_number": 35
		},
		{
			"field_name": "purchase_average_price",
			"local_field": "json_data.purchase_average_price",
			"field_type": "double",
			"field_number": 33
		},
		{
			"field_name": "purchase_costs",
			"local_field": "json_data.purchase_costs",
			"field_type": "double",
			"field_number": 36
		},
		{
			"field_name": "purchase_price__unit",
			"local_field": "json_data.purchase_price__unit",
			"field_type": "double",
			"field_number": 13
		},
		{
			"field_name": "purchase_price_change_date",
			"local_field": "json_data.purchase_price_change_date",
			"field_type": "date",
			"field_number": 31
		},
		{
			"field_name": "purchase_price_total",
			"local_field": "json_data.purchase_price_total",
			"field_type": "double",
			"field_number": 10
		},
		{
			"field_name": "record_id",
			"local_field": "record_id",
			"field_type": "varchar",
			"field_length": 45,
			"field_number": 28,
			"length": 90,
			"constraint": ["unique"]
		},
		{
			"field_name": "sales_price__unit",
			"local_field": "json_data.sales_price__unit",
			"field_type": "double",
			"field_number": 15
		},
		{
			"field_name": "sales_price_total",
			"local_field": "json_data.sales_price_total",
			"field_type": "double",
			"field_number": 14
		},
		{
			"field_name": "state",
			"local_field": "json_data.state",
			"field_type": "integer",
			"field_number": 47,
			"constraint": ["index"]
		},
		{
			"field_name": "stock_balance",
			"local_field": "json_data.stock_balance",
			"field_type": "double",
			"field_number": 16
		},
		{
			"field_name": "stock_balance_wip",
			"local_field": "json_data.stock_balance_wip",
			"field_type": "double",
			"field_number": 37,
			"constraint": ["index"]
		},
		{
			"field_name": "stock_event_id",
			"local_field": "stock_id",
			"field_type": "varchar",
			"field_length": 10,
			"field_number": 11,
			"length": 20,
			"constraint": ["unique"]
		},
		{
			"field_name": "storage_place",
			"local_field": "json_data.storage_place",
			"field_type": "varchar",
			"field_length": 30,
			"field_number": 9,
			"length": 60,
			"constraint": ["index"]
		},
		{
			"field_name": "supplier_id",
			"local_field": "json_data.supplier_id",
			"field_type": "varchar",
			"field_length": 12,
			"field_number": 3,
			"length": 24,
			"constraint": ["index"],
			"foreign_key": [
				{
					"link_type": "prevent delete",
					"linked_field": "supplier_id",
					"linked_table": "supplier"
				}
			],
			"nullable": true
		},
		{
			"field_name": "time_",
			"local_field": "json_data.time",
			"field_type": "time",
			"field_number": 6
		},
		{
			"field_name": "transfer_id",
			"local_field": "json_data.transfer_id",
			"field_type": "varchar",
			"field_length": 60,
			"field_number": 40,
			"length": 120,
			"constraint": ["index"]
		},
		{
			"field_name": "transfer_state",
			"local_field": "json_data.transfer_state",
			"field_type": "integer",
			"field_number": 46
		},
		{
			"field_name": "type_",
			"local_field": "event_type",
			"field_type": "varchar",
			"field_length": 20,
			"field_number": 4,
			"length": 40,
			"constraint": ["index"]
		},
		{
			"field_name": "unit",
			"local_field": "json_data.unit",
			"field_type": "varchar",
			"field_length": 10,
			"field_number": 38,
			"length": 20
		},
		{
			"field_name": "unit_2",
			"local_field": "json_data.unit_2",
			"field_type": "varchar",
			"field_length": 10,
			"field_number": 39,
			"length": 20
		}
	]
}
