dto_generator:
  entities:
    logic:
      XCart\Logic\Entity\Storefront\Category:
        doctrineEntity: XLite\Model\Category
        generate_get_one: true
        generate_get_collection: true
        use_doctrine_get_one: true
        use_doctrine_get_collection: true
        fields:
          name:
            type: string
          description:
            type: string
          cleanUrl:
            type: string
            nullable: true
          showTitle:
            type: bool
          icon:
            type: XCart\Logic\Entity\Storefront\Image
            nullable: true
          banner:
            type: XCart\Logic\Entity\Storefront\Image
            nullable: true
          metaTags:
            type: string
            nullable: true
          metaDescription:
            type: string
            nullable: true
          metaTitle:
            type: string
          path:
            type: XCart\Logic\Entity\Storefront\Category\PathElement[]
          hasSubcategories:
            type: bool

    dto:
      XCart\Logic\Action\Storefront\Category\GetList\DTO\Request\Filter:
        type: logic_request_get_list_filter
        fields:
          parent:
            type: IntegerValue
            nullable: true

      XCart\Logic\Action\Storefront\Category\GetList\DTO\Request\OrderRule:
        type: logic_request_get_list_order_rule
        fields:
          pos:
            type: string
            nullable: true

      XCart\DTO\Doctrine\Storefront\Category\Filter:
        type: doctrine_entity_filter
        fields:
          parent:
            type: IntegerValue
            nullable: true
          enabled:
            type: BooleanValue
            nullable: true
          membership:
            type: IntegerValue
            nullable: true

      XCart\DTO\Doctrine\Storefront\Category\OrderRule:
        type: doctrine_entity_order_rule
        fields:
          pos:
            type: string
            nullable: true

    logic_request:
      XCart\Logic\Action\Storefront\Category\GetList\DTO\Request:
        type: get_collection
        entity: XCart\Logic\Entity\Storefront\Category
        interfaces:
          - XCart\Logic\DTO\Request\ProfileOwnerRequestInterface
        traits:
          - XCart\Logic\DTO\Request\ProfileOwnerRequestTrait

      XCart\Logic\Action\Storefront\Category\GetOne\DTO\Request:
        type: get_one
        entity: XCart\Logic\Entity\Storefront\Category
        interfaces:
          - XCart\Logic\DTO\Request\ProfileOwnerRequestInterface
        traits:
          - XCart\Logic\DTO\Request\ProfileOwnerRequestTrait

  transformers:
    - from: XLite\Model\Category
      to: XCart\Logic\Entity\Storefront\Category
      pattern: predefined
    - from: XLite\Model\Category
      to: XCart\Logic\Entity\Storefront\NewCategory
      pattern: predefined
