{
	"name": "table/external/4d/product/work_phase_actual.json",
	"table_name": "work_phase_actual",
	"table_prefix": "wpa",
	"main_table": "work_order",
	"record_type": ["actual"],
	"local_table": "product_work",
	"local_record_type": "actual",
	"table_number": 48,
	"field": [
		{
			"field_name": "additional_data",
			"local_field": "json_data.additional_data",
			"field_type": "text",
			"field_number": 71
		},
		{
			"field_name": "change_id",
			"local_field": "modify_id",
			"field_type": "varchar",
			"field_length": 45,
			"field_number": 59
		},
		{
			"field_name": "contract_multiplier",
			"local_field": "json_data.contract_multiplier",
			"field_type": "double",
			"field_number": 31
		},
		{
			"field_name": "contract_price__unit",
			"local_field": "json_data.contract_price__unit",
			"field_type": "double",
			"field_number": 12
		},
		{
			"field_name": "contract_salary",
			"local_field": "json_data.contract_salary",
			"field_type": "boolean",
			"field_number": 22
		},
		{
			"field_name": "cost_center",
			"local_field": "json_data.cost_center",
			"field_type": "varchar",
			"field_length": 20,
			"field_number": 33
		},
		{
			"field_name": "creator_id",
			"local_field": "json_data.create_user",
			"field_type": "varchar",
			"field_length": 20,
			"field_number": 60
		},
		{
			"field_name": "customer_project",
			"local_field": "json_data.customer_project",
			"field_type": "varchar",
			"field_length": 40,
			"field_number": 57
		},
		{
			"field_name": "date_",
			"local_field": "json_data.end_date",
			"field_type": "date",
			"field_number": 15,
			"constraint": ["index"]
		},
		{
			"field_name": "employee_id",
			"local_field": "person_id",
			"field_type": "varchar",
			"field_length": 12,
			"field_number": 3,
			"value_map": "table/external/4d/prf/constant-4d.json/person_id",
			"constraint": ["index"],
			"foreign_key": [
				{
					"link_type": "prevent delete",
					"linked_field": "employee_id",
					"linked_table": "employee"
				}
			],
			"nullable": true
		},
		{
			"field_name": "end_time",
			"local_field": "json_data.end_time",
			"field_type": "time",
			"field_number": 41
		},
		{
			"field_name": "est_bonus_work_time__unit",
			"local_field": "json_data.est_bonus_work_time__unit",
			"field_type": "double",
			"field_number": 48
		},
		{
			"field_name": "est_contract_price__unit",
			"local_field": "json_data.est_contract_price__unit",
			"field_type": "double",
			"field_number": 53
		},
		{
			"field_name": "est_machine_setup_cost__hour",
			"local_field": "json_data.est_machine_setup_cost__hour",
			"field_type": "double",
			"field_number": 51
		},
		{
			"field_name": "est_machine_work_cost__hour",
			"local_field": "json_data.est_machine_work_cost__hour",
			"field_type": "double",
			"field_number": 52
		},
		{
			"field_name": "est_salary__hour",
			"local_field": "json_data.est_salary__hour",
			"field_type": "double",
			"field_number": 50
		},
		{
			"field_name": "est_setup_salary__hour",
			"local_field": "json_data.est_setup_salary__hour",
			"field_type": "double",
			"field_number": 49
		},
		{
			"field_name": "est_setup_time__lot",
			"local_field": "json_data.est_setup_hours",
			"field_type": "double",
			"field_number": 47
		},
		{
			"field_name": "est_work_time__unit",
			"local_field": "json_data.est_work_time__unit",
			"field_type": "double",
			"field_number": 46
		},
		{
			"field_name": "evening_work_hours",
			"local_field": "json_data.evening_work_hours",
			"field_type": "double",
			"field_number": 29
		},
		{
			"field_name": "failed_amount",
			"local_field": "failed_amount",
			"field_type": "double",
			"field_number": 34
		},
		{
			"field_name": "firm_id",
			"local_field": "json_data.firm_id",
			"field_type": "integer",
			"field_number": 40,
			"constraint": ["index"]
		},
		{
			"field_name": "hourly_salary",
			"local_field": "json_data.hourly_salary",
			"field_type": "boolean",
			"field_number": 14
		},
		{
			"field_name": "info",
			"local_field": "info",
			"field_type": "text",
			"field_number": 17
		},
		{
			"field_name": "kind",
			"local_field": "json_data.kind",
			"field_type": "double",
			"field_number": 20
		},
		{
			"field_name": "machine_hours",
			"local_field": "machine_hours",
			"field_type": "double",
			"field_number": 27
		},
		{
			"field_name": "machine_setup_cost__hour",
			"local_field": "setup_hourly_self_cost",
			"field_type": "double",
			"field_number": 10
		},
		{
			"field_name": "machine_work_cost__hour",
			"local_field": "work_hourly_self_cost",
			"field_type": "double",
			"field_number": 11
		},
		{
			"field_name": "measured_track_time",
			"local_field": "json_data.measured_track_time",
			"field_type": "double",
			"field_number": 73
		},
		{
			"field_name": "modifier_id",
			"local_field": "modify_user",
			"field_type": "varchar",
			"field_length": 20,
			"field_number": 61
		},
		{
			"field_name": "night_work_hours",
			"local_field": "json_data.night_work_hours",
			"field_type": "double",
			"field_number": 30
		},
		{
			"field_name": "parcel_code",
			"local_field": "json_data.parcel_code",
			"field_type": "varchar",
			"field_length": 40,
			"field_number": 65,
			"constraint": ["index"]
		},
		{
			"field_name": "previous_track_time",
			"local_field": "json_data.previous_track_time",
			"field_type": "double",
			"field_number": 76
		},
		{
			"field_name": "produced_amount",
			"local_field": "produced_amount",
			"field_type": "double",
			"field_number": 5
		},
		{
			"field_name": "production_lot",
			"local_field": "production_order_id",
			"field_type": "varchar",
			"field_length": 35,
			"field_number": 19,
			"constraint": ["index"],
			"foreign_key": [
				{
					"link_type": "prevent delete",
					"linked_field": "production_lot",
					"linked_table": "work_order"
				},
				{
					"info": "4D production_lot to work_order_schedule",
					"extra_link_field": [
						{
							"linked": "wos.work_phase",
							"linking": "wpa.work_phase_est_id"
						}
					],
					"link_type": "do nothing",
					"linked_field": "production_lot",
					"linked_table": "work_order_schedule"
				}
			],
			"nullable": true
		},
		{
			"field_name": "profit_multiplier",
			"local_field": "profit_multiplier",
			"field_type": "double",
			"field_number": 23
		},
		{
			"field_name": "program_id",
			"local_field": "json_data.program_id",
			"field_type": "varchar",
			"field_length": 200,
			"field_number": 54,
			"constraint": ["index"]
		},
		{
			"field_name": "project_id",
			"local_field": "json_data.project_id",
			"field_type": "varchar",
			"field_length": 40,
			"field_number": 58
		},
		{
			"field_name": "record_id",
			"local_field": "record_id",
			"field_type": "varchar",
			"field_length": 45,
			"field_number": 39,
			"constraint": ["unique"]
		},
		{
			"field_name": "salary__hour",
			"local_field": "work_hourly_salary",
			"field_type": "double",
			"field_number": 9
		},
		{
			"field_name": "salary_bonus",
			"local_field": "json_data.salary_bonus",
			"field_type": "double",
			"field_number": 26
		},
		{
			"field_name": "setup_salary__hour",
			"local_field": "setup_hourly_salary",
			"field_type": "double",
			"field_number": 8
		},
		{
			"field_name": "setup_time__amount",
			"local_field": "setup_hours",
			"field_type": "double",
			"field_number": 7
		},
		{
			"field_name": "shift_number",
			"local_field": "json_data.work_shift",
			"field_type": "integer",
			"field_number": 45
		},
		{
			"field_name": "show_type",
			"field_type": "varchar",
			"field_length": 40,
			"field_number": 74,
			"constraint": ["index"]
		},
		{
			"field_name": "smelting_num",
			"local_field": "json_data.material_batch",
			"field_type": "varchar",
			"field_length": 40,
			"field_number": 35
		},
		{
			"field_name": "social_cost_multiplier",
			"local_field": "json_data.social_cost_multiplier",
			"field_type": "double",
			"field_number": 32
		},
		{
			"field_name": "start_date",
			"local_field": "json_data.start_date",
			"field_type": "date",
			"field_number": 42,
			"constraint": ["index"]
		},
		{
			"field_name": "start_employee_id",
			"local_field": "json_data.start_person_id",
			"field_type": "varchar",
			"value_map": "table/external/4d/prf/constant-4d.json/person_id",
			"field_length": 12,
			"field_number": 68,
			"constraint": ["index"]
		},
		{
			"field_name": "start_shift_number",
			"local_field": "json_data.start_work_shift",
			"field_type": "integer",
			"field_number": 69
		},
		{
			"field_name": "start_subtype",
			"local_field": "json_data.start_subtype",
			"value_map": "table/external/4d/prf/constant-4d.json/work_phase_actual_start_substate",
			"field_type": "varchar",
			"field_length": 20,
			"field_number": 70
		},
		{
			"field_name": "start_time",
			"local_field": "json_data.start_time",
			"field_type": "time",
			"field_number": 43
		},
		{
			"field_name": "started_amount",
			"local_field": "started_amount",
			"field_type": "double",
			"field_number": 55
		},
		{
			"field_name": "stock_event_id",
			"local_field": "json_data.stock_event_id",
			"field_type": "varchar",
			"field_length": 10,
			"field_number": 28,
			"foreign_key": [
				{
					"link_type": "prevent delete",
					"linked_field": "stock_event_id",
					"linked_table": "stock_event"
				}
			]
		},
		{
			"field_name": "subcontract",
			"local_field": "subcontract",
			"field_type": "boolean",
			"field_number": 37
		},
		{
			"field_name": "subtype",
			"local_field": "json_data.substate",
			"field_type": "varchar",
			"field_length": 20,
			"field_number": 66,
			"value_map": "table/external/4d/prf/constant-4d.json/work_phase_actual_substate",
			"constraint": ["index"]
		},
		{
			"field_name": "supplier_id",
			"local_field": "json_data.supplier_id",
			"field_type": "varchar",
			"field_length": 20,
			"field_number": 38,
			"constraint": ["index"],
			"foreign_key": [
				{
					"link_type": "prevent delete",
					"linked_field": "supplier_id",
					"linked_table": "supplier"
				}
			],
			"nullable": true
		},
		{
			"field_name": "target_machine_time",
			"local_field": "json_data.target_machine_time",
			"field_type": "double",
			"field_number": 72
		},
		{
			"field_name": "target_time",
			"local_field": "json_data.target_time",
			"field_type": "double",
			"field_number": 67
		},
		{
			"field_name": "track_time",
			"local_field": "json_data.track_time",
			"field_type": "double",
			"field_number": 63
		},
		{
			"field_name": "track_time_status",
			"local_field": "json_data.track_time_status",
			"field_type": "integer",
			"field_number": 64
		},
		{
			"field_name": "transfer_id",
			"local_field": "json_data.transfer_id",
			"field_type": "varchar",
			"field_length": 60,
			"field_number": 56,
			"constraint": ["index"]
		},
		{
			"field_name": "transfer_state",
			"local_field": "json_data.transfer_state",
			"field_type": "integer",
			"field_number": 62
		},
		{
			"field_name": "type_",
			"local_field": "work_phase_state",
			"field_type": "varchar",
			"value_map": "table/external/4d/prf/constant-4d.json/work_phase_actual_type",
			"field_length": 35,
			"field_number": 4,
			"constraint": ["index"]
		},
		{
			"field_name": "unpaid_hours",
			"local_field": "json_data.unpaid_hours",
			"field_type": "double",
			"field_number": 44
		},
		{
			"field_name": "user_id",
			"local_field": "json_data.user_id",
			"field_type": "varchar",
			"field_length": 12,
			"field_number": 21
		},
		{
			"field_name": "work__position_num_id",
			"local_field": "product_id",
			"field_type": "varchar",
			"field_length": 30,
			"field_number": 1,
			"constraint": ["index"],
			"foreign_key": [
				{
					"link_type": "prevent delete",
					"linked_field": "work__position_num_id",
					"linked_table": "work"
				}
			],
			"nullable": true
		},
		{
			"field_name": "work_cost_price__amount",
			"local_field": "cost_price",
			"field_type": "double",
			"field_number": 24
		},
		{
			"field_name": "work_description",
			"local_field": "description",
			"field_type": "text",
			"field_number": 16
		},
		{
			"field_name": "work_load_group_id",
			"local_field": "resource_id",
			"field_type": "varchar",
			"value_map": "table/external/4d/prf/constant-4d.json/load_group",
			"field_length": 12,
			"field_number": 2,
			"constraint": ["index"],
			"foreign_key": [
				{
					"link_type": "prevent delete",
					"linked_field": "work_load_group_id",
					"linked_table": "work_load_group"
				}
			],
			"nullable": true
		},
		{
			"field_name": "work_location_id",
			"field_type": "varchar",
			"field_length": 40,
			"field_number": 75
		},
		{
			"field_name": "work_phase_actual_id",
			"local_field": "json_data.work_phase_actual_id",
			"field_type": "integer",
			"field_number": 36,
			"constraint": ["index"]
		},
		{
			"field_name": "work_phase_est_id",
			"local_field": "work_phase_number",
			"field_type": "integer",
			"field_number": 18,
			"constraint": ["index"]
		},
		{
			"field_name": "work_salary__amount",
			"local_field": "salary",
			"field_type": "double",
			"field_number": 13
		},
		{
			"field_name": "work_sales_price__amount",
			"local_field": "sales_price",
			"field_type": "double",
			"field_number": 25
		},
		{
			"field_name": "work_time__amount",
			"local_field": "work_hours",
			"field_type": "double",
			"field_number": 6
		}
	]
}
