->
add('referencedId',
new Type('string'
)) ->
add('coverId',
new Type('string'
),
new EntityExists(['entity' => MediaDefinition::ENTITY_NAME, 'context' => Context::
createDefaultContext()])) ->
addSub( 'priceDefinition',
(new DataValidationDefinition()) ->
add('type',
new Type('string'
)) ->
add('price',
new Type('numeric'
)) ->
add('percentage',
new Type('numeric'
)) ->
add('quantity',
new Type('int'
)) ->
add('isCalculated',
new Type('bool'
)) ->
add('listPrice',
new Type('numeric'
)) ->
addList( 'taxRules',
(new DataValidationDefinition()) ->
add('taxRate',
new Type('numeric'
)) ->
add('percentage',
new Type('numeric'
)) ) );
}}