{
	"field": [
		{
			"type": "varchar",
			"length": 20,
			"name": "account_id",
			"constraint": [
				"primary key",
				"unique"
			]
		},
		{
			"type": "varchar",
			"length": 20,
			"name": "contra_account_id",
			"foreign_key": {
				"field": "account_id",
				"link_type": "prevent delete",
				"table": "bookkeeping_account"
			}
		},
		{
			"type": "varchar",
			"length": 20,
			"name": "vat_account_id",
			"foreign_key": {
				"field": "account_id",
				"link_type": "prevent delete",
				"table": "bookkeeping_account"
			}
		},
		{
			"type": "varchar",
			"length": 20,
			"name": "account_type"
		},
		{
			"type": "varchar",
			"length": 80,
			"name": "name"
		},
		{
			"name": "vat_percent",
			"type": "double"
		},
		{
			"name": "info",
			"type": "text"
		},
		{
			"name": "json_data",
			"type": "jsonb"
		}
	],
	"table_prefix": "bka",
	"save_script": [],
	"extra_field": [
		{
			"type": "varchar",
			"length": 40,
			"name": "json_data.account_number"
		},
		{
			"type": "boolean",
			"name": "json_data.default_debet"
		},
		{
			"type": "boolean",
			"name": "json_data.default_kredit"
		},
		{
			"type": "integer",
			"name": "json_data.firm_id"
		},
		{
			"type": "varchar",
			"length": 40,
			"name": "json_data.modifier_id"
		},
		{
			"type": "text",
			"name": "json_data.receive_accounts"
		},
		{
			"type": "text",
			"name": "json_data.send_accounts"
		},
		{
			"type": "varchar",
			"length": 120,
			"name": "json_data.transfer_id"
		},
		{
			"type": "integer",
			"name": "json_data.transfer_state"
		},
		{
			"type": "integer",
			"name": "json_data.year"
		}
	],
	"calculated_field": [],
	"constraint": {
		"save": {
			"allow": [
				{
					"field": "bka_account_id",
					"message": "Field '%s' may not be empty",
					"code": [
						[
							"bka_account_id",
							"<>",
							""
						]
					]
				}
			]
		}
	},
	"name": "/structure_ma/bookkeeping_account.json",
	"table_name": "bookkeeping_account"
}