{
	"save_script": [],
	"field": [
		{
			"type": "varchar",
			"length": 40,
			"name": "company_id",
			"constraint": ["primary key", "unique"]
		},
		{
			"type": "varchar",
			"length": 80,
			"name": "delivery_company_id",
			"foreign_key": {
				"field": "company_id",
				"link_type": "prevent delete",
				"table": "company"
			}
		},
		{
			"type": "varchar",
			"length": 80,
			"name": "invoicing_company_id",
			"foreign_key": {
				"field": "company_id",
				"link_type": "prevent delete",
				"table": "company"
			}
		},
		{
			"type": "varchar",
			"length": 20,
			"name": "currency_id",
			"foreign_key": {
				"field": "currency_id",
				"link_type": "prevent delete",
				"table": "currency"
			}
		},
		{
			"type": "varchar",
			"length": 40,
			"name": "terms_of_payment_id",
			"foreign_key": {
				"field": "terms_of_payment_id",
				"link_type": "prevent delete",
				"table": "terms_of_payment"
			}
		},
		{
			"type": "varchar",
			"length": 40,
			"name": "order_code_id",
			"foreign_key": {
				"field": "order_code_id",
				"link_type": "prevent delete",
				"table": "order_code"
			}
		},
		{
			"type": "varchar",
			"length": 20,
			"name": "company_number"
		},
		{
			"type": "varchar",
			"length": 120,
			"name": "name"
		},
		{
			"type": "varchar",
			"length": 120,
			"name": "name_2"
		},
		{
			"type": "varchar",
			"length": 120,
			"name": "address"
		},
		{
			"type": "varchar",
			"length": 40,
			"name": "post_code"
		},
		{
			"type": "varchar",
			"length": 120,
			"name": "post_office"
		},
		{
			"type": "varchar",
			"length": 80,
			"name": "country"
		},
		{
			"type": "varchar",
			"length": 80,
			"name": "language"
		},
		{
			"name": "text_address",
			"type": "text"
		},
		{
			"type": "varchar",
			"length": 80,
			"name": "email"
		},
		{
			"type": "varchar",
			"length": 80,
			"name": "www"
		},
		{
			"type": "varchar",
			"length": 80,
			"name": "phone_number"
		},
		{
			"type": "varchar",
			"length": 80,
			"name": "your_reference"
		},
		{
			"type": "varchar",
			"length": 80,
			"name": "way_of_delivery"
		},
		{
			"type": "varchar",
			"length": 80,
			"name": "term_of_delivery"
		},
		{
			"type": "varchar",
			"length": 40,
			"name": "company_type"
		},
		{
			"type": "varchar",
			"length": 20,
			"name": "record_type"
		},
		{
			"name": "company_state",
			"type": "integer"
		},
		{
			"name": "info",
			"type": "text"
		},
		{
			"name": "info3",
			"type": "text"
		},
		{
			"name": "json_data",
			"type": "jsonb"
		}
	],
	"constraint": {
		"save": {
			"allow": [
				{
					"field": "co_company_id",
					"message": "Field '%s' may not be empty",
					"code": [["co_company_id", "<>", ""]]
				},
				{
					"field": "co_currency_id",
					"message": "Field '%s' may not be empty",
					"code": [["co_currency_id", "<>", ""]]
				},
				{
					"field": "co_terms_of_payment_id",
					"message": "Field '%s' may not be empty",
					"code": [["co_terms_of_payment_id", "<>", ""]]
				}
			]
		}
	},
	"table_prefix": "co",
	"extra_field": [
		{
			"type": "varchar",
			"length": 40,
			"name": "json_data.abc_class"
		},
		{
			"type": "varchar",
			"length": 24,
			"name": "json_data.accountable_person_id"
		},
		{
			"type": "integer",
			"name": "json_data.add_packing_cost"
		},
		{
			"type": "integer",
			"name": "json_data.add_packing_material"
		},
		{
			"type": "integer",
			"name": "json_data.allowed_delivery_advance"
		},
		{
			"type": "integer",
			"name": "json_data.allowed_delivery_delay"
		},
		{
			"type": "varchar",
			"length": 80,
			"name": "json_data.area"
		},
		{
			"type": "integer",
			"name": "json_data.add_packing_cost"
		},
		{
			"type": "integer",
			"name": "json_data.add_packing_material"
		},
		{
			"type": "varchar",
			"length": 80,
			"name": "json_data.bank_account"
		},
		{
			"type": "double",
			"name": "json_data.capacity_multiplier"
		},
		{
			"type": "varchar",
			"length": 24,
			"name": "json_data.company_number"
		},
		{
			"type": "varchar",
			"length": 160,
			"name": "json_data.cost_center"
		},
		{
			"type": "varchar",
			"length": 160,
			"name": "json_data.covenant"
		},
		{
			"type": "date",
			"name": "json_data.creation_date"
		},
		{
			"type": "double",
			"name": "json_data.credit_limit"
		},
		{
			"type": "double",
			"name": "json_data.cumulative_sales"
		},
		{
			"type": "varchar",
			"length": 80,
			"name": "json_data.customer_project"
		},
		{
			"type": "varchar",
			"length": 24,
			"name": "json_data.default_sales_person_id"
		},
		{
			"type": "varchar",
			"length": 160,
			"name": "json_data.electronic_invoice_address"
		},
		{
			"type": "integer",
			"name": "json_data.employee_count"
		},
		{
			"type": "double",
			"name": "json_data.extra_cost_to_invoice"
		},
		{
			"type": "double",
			"name": "json_data.extra_time_multiplier"
		},
		{
			"type": "varchar",
			"length": 20,
			"name": "json_data.fax_area_code"
		},
		{
			"type": "varchar",
			"length": 40,
			"name": "json_data.fax_number"
		},
		{
			"type": "integer",
			"name": "json_data.firm_id"
		},
		{
			"type": "boolean",
			"name": "json_data.foreign_company"
		},
		{
			"type": "boolean",
			"name": "json_data.foreign_sales_price_in_use"
		},
		{
			"type": "varchar",
			"length": 160,
			"name": "json_data.freight_charges_payer"
		},
		{
			"type": "varchar",
			"length": 24,
			"name": "json_data.group_1"
		},
		{
			"type": "varchar",
			"length": 24,
			"name": "json_data.group_2"
		},
		{
			"type": "varchar",
			"length": 24,
			"name": "json_data.group_3"
		},
		{
			"type": "varchar",
			"length": 20,
			"name": "json_data.invoice_number_serie"
		},
		{
			"type": "boolean",
			"name": "json_data.is_collection_invoice"
		},
		{
			"type": "date",
			"name": "json_data.last_modification_date"
		},
		{
			"type": "varchar",
			"length": 40,
			"name": "json_data.modifier_id"
		},
		{
			"type": "double",
			"name": "json_data.order_discount_percentage"
		},
		{
			"type": "integer",
			"name": "json_data.payment_delay"
		},
		{
			"type": "varchar",
			"length": 160,
			"name": "json_data.price_group"
		},
		{
			"type": "varchar",
			"length": 80,
			"name": "json_data.project_id"
		},
		{
			"type": "double",
			"name": "json_data.row_discount_percentage"
		},
		{
			"type": "varchar",
			"length": 80,
			"name": "json_data.send_type"
		},
		{
			"type": "varchar",
			"length": 60,
			"name": "json_data.stock_position"
		},
		{
			"type": "varchar",
			"length": 30,
			"name": "json_data.supplier_number"
		},
		{
			"type": "varchar",
			"length": 80,
			"name": "json_data.intermediator"
		},
		{
			"type": "varchar",
			"length": 20,
			"name": "json_data.telephone_area_code"
		},
		{
			"type": "varchar",
			"length": 40,
			"name": "json_data.telephone_number"
		},
		{
			"type": "varchar",
			"length": 34,
			"name": "data.trade_registry_number"
		},
		{
			"type": "varchar",
			"length": 120,
			"name": "json_data.transfer_id"
		},
		{
			"type": "integer",
			"name": "json_data.transfer_state"
		},
		{
			"type": "varchar",
			"length": 50,
			"name": "json_data.vat_number"
		},
		{
			"type": "varchar",
			"length": 80,
			"name": "json_data.waybill_customer_number"
		},
		{
			"type": "varchar",
			"length": 80,
			"name": "json_data.waybill_deal_number"
		},
		{
			"type": "double",
			"name": "json_data.work_advance_days"
		},
		{
			"type": "varchar",
			"length": 40,
			"name": "json_data.bank"
		},
		{
			"type": "varchar",
			"length": 10,
			"name": "json_data.bank_code"
		},
		{
			"type": "varchar",
			"length": 24,
			"name": "json_data.default_account_id"
		},
		{
			"type": "integer",
			"name": "json_data.delivery_time"
		},
		{
			"type": "boolean",
			"name": "json_data.is_foreign_supplier"
		},
		{
			"type": "varchar",
			"length": 24,
			"name": "json_data.number"
		},
		{
			"type": "double",
			"name": "json_data.purchase_costs"
		},
		{
			"type": "varchar",
			"length": 160,
			"name": "json_data.shelf_number"
		},
		{
			"type": "varchar",
			"length": 4,
			"name": "json_data.type"
		}
	],
	"calculated_field": [],
	"field_change": [
		{
			"name": "company_state",
			"old_name": ["record_state"]
		}
	],
	"name": "table/manager/company/company.json",
	"table_name": "company"
}
