Oro\Bundle\SaleBundle\Entity\Quote:
    properties:
        owner:
            - NotBlank: ~
        qid:
            - NotBlank:
                groups: [ Import ]
        organization:
            - NotBlank:
                groups: [ Import ]
        validUntil:
            - NotBlank:
                groups: [ Import ]
        poNumber:
            - Length:
                max: 255
        shipUntil:
            - Type:
                type: DateTimeInterface
                message: oro.sale.quote.ship_until.type.message
                payload:
                    jsValidation:
                        type: Date
        quoteProducts:
            - Valid: ~

Oro\Bundle\SaleBundle\Entity\QuoteProduct:
    constraints:
        - Oro\Bundle\SaleBundle\Validator\Constraints\QuoteProduct: ~
    properties:
        quote:
            - NotBlank: ~
        productSku:
            - NotBlank:
                groups: [ Import ]
        type:
            - NotBlank: ~
        quoteProductRequests:
            - Valid: ~
        quoteProductOffers:
            - Count:
                min: 1
                minMessage: 'oro.sale.quoteproduct.quote_product_items.blank'
            - Valid: ~

Oro\Bundle\SaleBundle\Entity\QuoteProductRequest:
    constraints:
        - Oro\Bundle\ProductBundle\Validator\Constraints\QuantityUnitPrecision:
            path: quantity
    properties:
        quoteProduct:
            - NotBlank: ~
        quantity:
            - Oro\Bundle\ValidationBundle\Validator\Constraints\Decimal: ~
            - Oro\Bundle\ValidationBundle\Validator\Constraints\GreaterThanZero: ~
        productUnit:
            - NotBlank:
                message: 'oro.product.productunit.invalid'
        productUnitCode:
            - NotBlank:
                groups: [ Import ]
        price:
            - Valid: ~

Oro\Bundle\SaleBundle\Entity\QuoteProductOffer:
    constraints:
        - Oro\Bundle\ProductBundle\Validator\Constraints\QuantityUnitPrecision:
            path: quantity
    properties:
        quoteProduct:
            - NotBlank: ~
        quantity:
            - NotBlank: ~
            - Oro\Bundle\ValidationBundle\Validator\Constraints\Decimal: ~
            - Oro\Bundle\ValidationBundle\Validator\Constraints\GreaterThanZero: ~
        priceType:
            - NotBlank: ~
        productUnit:
            - NotBlank:
                message: 'oro.product.productunit.invalid'
        productUnitCode:
            - NotBlank:
                groups: [ Import ]
        price:
            - Valid: ~

Oro\Bundle\SaleBundle\Entity\QuoteAddress:
    properties:
        phone:
            - Length:
                max: 255
        country:
            - NotBlank: ~

Oro\Bundle\SaleBundle\Entity\QuoteDemand:
    properties:
        demandProducts:
            - Symfony\Component\Validator\Constraints\Valid: ~

Oro\Bundle\SaleBundle\Entity\QuoteProductDemand:
    constraints:
        - Oro\Bundle\SaleBundle\Validator\Constraints\AllowedQuoteDemandQuantity: ~
        - Oro\Bundle\ProductBundle\Validator\Constraints\QuantityUnitPrecision:
              path: quantity
    properties:
        quantity:
            - NotBlank: ~
            - Oro\Bundle\ValidationBundle\Validator\Constraints\Decimal: ~
            - Oro\Bundle\ValidationBundle\Validator\Constraints\GreaterThanZero: ~
        quoteProductOffer:
            - NotBlank: ~
