dto_generator:
  entities:
    logic:
      XCart\Logic\Entity\Storefront\Principal:
        doctrineEntity: XLite\Model\Profile
        generate_get_one: true
        idType: manual
        fields:
          id:
            id: true
            type: string
            nullable: true
          email:
            type: string
            nullable: true
          firstname:
            type: string
            nullable: true
          lastname:
            type: string
            nullable: true
          roles:
            type: string[]

      XCart\Logic\Entity\Storefront\ResetPasswordAction:
        doctrineEntity: XLite\Model\Profile
        generate_create_one: true
        fields:
          username:
            type: string
            nullable: true

    logic_request:
      XCart\Logic\Action\Storefront\Principal\GetOne\DTO\Request:
        type: get_one
        entity: XCart\Logic\Entity\Storefront\Principal
        interfaces:
          - XCart\Logic\DTO\Request\NullableIdRequestInterface
          - XCart\Logic\DTO\Request\ProfileOwnerRequestInterface
        traits:
          - XCart\Logic\DTO\Request\NullableIdRequestTrait
          - XCart\Logic\DTO\Request\ProfileOwnerRequestTrait

  transformers:
    - from: XLite\Model\Profile
      to: XCart\Logic\Entity\Storefront\Principal
      pattern: predefined
    - from: XCart\Logic\Entity\Storefront\Principal
      to: XCart\API\Entity\Principal

    - from: XLite\Model\Profile
      to: XCart\Logic\Entity\Storefront\NewResetPasswordAction
    - from: XCart\Logic\Entity\Storefront\NewResetPasswordAction
      to: XLite\Model\Profile
