{
	"name": "table/local/resource/capacity.json",
	"table_name": "capacity",
	"table_prefix": "cap",
	"record_type": ["", "4dcap", "4dcaprow", "4dresrow"],
	"table_name_language": {
		"": "Work capacity",
		"4dcap": "Work capacity 4D",
		"4dcaprow": "Work capacity row 4D",
		"4dresrow": "Resource row 4D"
	},
	"default_field": "table/prf/default_field.json",
	"default_order": [
		{
			"field": "shift_schedule_id",
			"order": ">"
		}
	],
	"default_order-": [
		{
			"field": "resource_id",
			"order": ">"
		},
		{
			"field": "person_id",
			"order": ">"
		}
	],
	"save_script": [],
	"field": [
		{
			"field_name": "shift_schedule_id",
			"field_type": "varchar",
			"field_length": 40,
			"constraint": ["index"]
		},
		{
			"field_name": "capacity_type",
			"field_type": "varchar",
			"field_length": 20
		},
		{
			"field_name": "capacity_state",
			"field_type": "integer"
		},
		{
			"field_name": "resource_id",
			"field_type": "varchar",
			"field_length": 40,
			"foreign_key": [
				{
					"link_type": "prevent delete",
					"linked_field": "resource_id",
					"linked_record_type": "",
					"linked_table": "resource",
					"linking_record_type": ""
				}
			]
		},
		{
			"field_name": "person_id",
			"field_type": "varchar",
			"field_length": 80,
			"foreign_key": [
				{
					"link_type": "prevent delete",
					"linked_field": "person_id",
					"linked_record_type": "",
					"linked_table": "person",
					"linking_record_type": ""
				}
			]
		},
		{
			"field_name": "start_time",
			"field_type": "timestamp"
		},
		{
			"field_name": "end_time",
			"field_type": "timestamp"
		},
		{
			"field_name": "capacity_multiplier",
			"field_type": "double"
		},
		{
			"field_name": "shift_order",
			"field_type": "varchar",
			"field_length": 40
		},
		{
			"field_name": "color",
			"field_type": "varchar",
			"field_length": 80
		},
		{
			"field_name": "info",
			"field_type": "text"
		}
	],
	"extra_field": [
		{
			"field_name": "json_data.capacity_name",
			"field_type": "varchar",
			"field_length": 120
		},
		{
			"field_name": "json_data.repeat_rule",
			"field_type": "varchar",
			"field_length": 20
		},
		{
			"field_name": "json_data.shift",
			"field_type": "integer"
		},
		{
			"field_name": "json_data.default_hours",
			"field_type": "double"
		},
		{
			"field_name": "json_data.actual_hours",
			"field_type": "double"
		},
		{
			"field_name": "json_data.resource_id",
			"field_type": "varchar",
			"field_length": 40
		},
		{
			"field_name": "json_data.transfer_state",
			"field_type": "integer"
		},
		{
			"field_name": "json_data.firm_id",
			"field_type": "integer"
		},
		{
			"field_name": "json_data.creator_id",
			"field_type": "varchar",
			"field_length": 45
		},
		{
			"field_name": "json_data.gross_capacity",
			"field_type": "double"
		},
		{
			"field_name": "json_data.transfer_id",
			"field_type": "varchar",
			"field_length": 60
		}
	],
	"field_change": [
		{
			"name": "capacity_state",
			"old_name": ["record_state"]
		},
		{
			"name": "shift_schedule_id",
			"old_name": ["capacity_id"]
		}
	]
}
