{
	"name": "table/local/resource/resource.json",
	"table_name": "resource",
	"table_prefix": "res",
	"record_type": ["load_group", "resource"],
	"table_name_language": {
		"load_group": "Load group",
		"resource": "Resource"
	},
	"default_field": "table/prf/default_field.json",
	"default_order": [
		{
			"field": "resource_id",
			"order": ">"
		}
	],
	"save_script": [],
	"field": [
		{
			"field_name": "resource_id",
			"field_type": "varchar",
			"field_length": 40,
			"constraint": ["primary key"]
		},
		{
			"field_name": "cell_resource_id",
			"field_type": "varchar",
			"field_length": 40,
			"foreign_key": [
				{
					"info": "this causes error: schema '4d', relations do not exist between tables 'resource' and 'work_load_group' using link table '['resource']', link fields: ''",
					"link_type": "prevent delete",
					"linked_field": "resource_id",
					"linked_record_type": "load_group",
					"linked_table": "resource",
					"linking_record_type": "resource"
				}
			]
		},
		{
			"field_name": "default_foreman_id",
			"field_type": "varchar",
			"field_length": 80,
			"foreign_key": [
				{
					"link_type": "prevent delete",
					"linked_field": "person_id",
					"linked_record_type": "employee",
					"linked_table": "person",
					"linking_record_type": ""
				}
			]
		},
		{
			"field_name": "description",
			"field_type": "text"
		},
		{
			"field_name": "info",
			"field_type": "text"
		},
		{
			"field_name": "profit_multiplier",
			"field_type": "double"
		},
		{
			"field_name": "resource_name",
			"field_type": "varchar",
			"field_length": 120
		},
		{
			"field_name": "resource_state",
			"field_type": "integer"
		},
		{
			"field_name": "resource_type",
			"field_type": "integer"
		},
		{
			"field_name": "extra_hours",
			"field_type": "double"
		},
		{
			"field_name": "last_phase_extra_hours",
			"field_type": "double"
		},
		{
			"field_name": "setup_hourly_salary",
			"field_type": "double"
		},
		{
			"field_name": "setup_hourly_self_cost",
			"field_type": "double"
		},
		{
			"field_name": "subcontractor_id",
			"field_type": "varchar",
			"field_length": 40,
			"foreign_key": [
				{
					"link_type": "prevent delete",
					"linked_field": "company_id",
					"linked_record_type": "",
					"linked_table": "company",
					"linking_record_type": ""
				}
			]
		},
		{
			"field_name": "work_hourly_salary",
			"field_type": "double"
		},
		{
			"field_name": "work_hourly_self_cost",
			"field_type": "double"
		}
	],
	"extra_field": [
		{
			"field_name": "json_data_alternative_resource",
			"field_type": "varchar",
			"info": "please check file project-todo-fi.md for explanation",
			"field_length": 120
		},
		{
			"field_name": "json_data.transfer_id",
			"field_type": "varchar",
			"field_length": 120
		},
		{
			"field_name": "json_data.worker_capacity__shift",
			"field_type": "double"
		},
		{
			"field_name": "json_data.allowed_open_phases",
			"field_type": "integer"
		},
		{
			"field_name": "json_data.customer_project",
			"field_type": "varchar",
			"field_length": 80
		},
		{
			"field_name": "json_data.loading_level",
			"field_type": "integer"
		},
		{
			"field_name": "json_data.target_time_setup_time",
			"field_type": "double"
		},
		{
			"field_name": "json_data.firm_id",
			"field_type": "integer"
		},
		{
			"field_name": "json_data.machine_data_path",
			"field_type": "text"
		},
		{
			"field_name": "json_data.machine_speed",
			"field_type": "double"
		},
		{
			"field_name": "json_data.use_realtime_receipt",
			"field_type": "integer"
		},
		{
			"field_name": "json_data.target_time_extra_percent",
			"field_type": "double"
		},
		{
			"field_name": "json_data.minimum_work_time",
			"field_type": "double"
		},
		{
			"field_name": "json_data.follow_work_progression",
			"field_type": "integer"
		},
		{
			"field_name": "json_data.load_efficiency_multiplier",
			"field_type": "double"
		},
		{
			"field_name": "json_data.setup_price",
			"field_type": "double"
		},
		{
			"field_name": "json_data.default_work_time",
			"field_type": "double"
		},
		{
			"field_name": "json_data.monthly_pre_maint_week",
			"field_type": "integer"
		},
		{
			"field_name": "json_data.work_calendar",
			"field_type": "varchar",
			"field_length": 80
		},
		{
			"field_name": "json_data.weekly_pre_maint_day",
			"field_type": "integer"
		},
		{
			"field_name": "json_data.calculate_target_time",
			"field_type": "integer"
		},
		{
			"field_name": "json_data.main_resource",
			"field_type": "varchar",
			"field_length": 24
		},
		{
			"field_name": "json_data.size",
			"field_type": "varchar",
			"field_length": 40
		},
		{
			"field_name": "json_data.automatic_receipt_delay",
			"field_type": "double"
		},
		{
			"field_name": "json_data.unproductive_min_time",
			"field_type": "double"
		},
		{
			"field_name": "json_data.transfer_state",
			"field_type": "integer"
		},
		{
			"field_name": "json_data.extra_time_capacity_name",
			"field_type": "varchar",
			"field_length": 160
		},
		{
			"field_name": "json_data.default_setup_hours",
			"field_type": "double"
		},
		{
			"field_name": "json_data.subcontract",
			"field_type": "boolean"
		},
		{
			"field_name": "json_data.follow_machine_data",
			"field_type": "integer"
		},
		{
			"field_name": "json_data.track_time_extra_time",
			"field_type": "double"
		},
		{
			"field_name": "json_data.follow_track_time",
			"field_type": "integer"
		},
		{
			"field_name": "json_data.loading_type",
			"field_type": "integer"
		},
		{
			"field_name": "json_data.default_foreman_id",
			"field_type": "varchar",
			"field_length": 40
		},
		{
			"field_name": "json_data.load_multiplier",
			"field_type": "double"
		},
		{
			"field_name": "json_data.project_id",
			"field_type": "varchar",
			"field_length": 80
		},
		{
			"field_name": "json_data.lead_time",
			"field_type": "double"
		},
		{
			"field_name": "json_data.shelf_number",
			"field_type": "varchar",
			"field_length": 160
		},
		{
			"field_name": "json_data.use_automatic_receipt",
			"field_type": "integer"
		},
		{
			"field_name": "json_data.units_in_hour",
			"field_type": "varchar",
			"field_length": 12
		},
		{
			"field_name": "json_data.monthly_pre_maint_day",
			"field_type": "integer"
		},
		{
			"field_name": "json_data.mach_max_capacity__shift",
			"field_type": "double"
		}
	]
}
