{
	"field": [
		{
			"type": "varchar",
			"length": 80,
			"name": "product_id",
			"foreign_key": {
				"field": "product_id",
				"link_type": "prevent delete",
				"table": "product"
			}
		},
		{
			"type": "varchar",
			"length": 40,
			"name": "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"
			}
		},
		{
			"name": "exchange_rate",
			"type": "double"
		},
		{
			"type": "varchar",
			"length": 80,
			"name": "product_code"
		},
		{
			"name": "price",
			"type": "double"
		},
		{
			"name": "discount_percent",
			"type": "double"
		},
		{
			"type": "varchar",
			"length": 40,
			"name": "price_type"
		},
		{
			"type": "varchar",
			"length": 40,
			"name": "price_group"
		},
		{
			"name": "start_amount",
			"type": "double"
		},
		{
			"name": "end_amount",
			"type": "double"
		},
		{
			"name": "start_date",
			"type": "date"
		},
		{
			"name": "end_date",
			"type": "date"
		},
		{
			"name": "info",
			"type": "text"
		},
		{
			"name": "json_data",
			"type": "jsonb"
		}
	],
	"table_prefix": "prpr",
	"save_script": [],
	"extra_field": [
		{
			"type": "double",
			"name": "json_data.default_price__unit"
		},
		{
			"type": "integer",
			"name": "json_data.discount_target"
		},
		{
			"type": "integer",
			"name": "json_data.firm_id"
		},
		{
			"type": "varchar",
			"length": 40,
			"name": "json_data.modifier_id"
		},
		{
			"type": "integer",
			"name": "json_data.state"
		},
		{
			"type": "varchar",
			"length": 120,
			"name": "json_data.transfer_id"
		},
		{
			"type": "integer",
			"name": "json_data.transfer_state"
		},
		{
			"type": "integer",
			"name": "json_data.type"
		},
		{
			"type": "integer",
			"name": "json_data.delivery_time"
		},
		{
			"type": "double",
			"name": "json_data.order_price__unit"
		},
		{
			"type": "integer",
			"name": "json_data.priority"
		},
		{
			"type": "double",
			"name": "json_data.purchase_costs"
		}
	],
	"calculated_field": [],
	"constraint": {
		"save": {
			"allow": [
				{
					"field": "prpr_product_id",
					"message": "Field '%s' may not be empty",
					"code": [
						[
							"prpr_product_id",
							"<>",
							""
						]
					]
				},
				{
					"field": "prpr_currency_id",
					"message": "Field '%s' may not be empty",
					"code": [
						[
							"prpr_currency_id",
							"<>",
							""
						]
					]
				}
			]
		}
	},
	"name": "structure_ma/prpr.json",
	"table_name": "product_price"
}