easy_admin:
    entities:
        Teams:
            controller: App\Controller\Admin\TeamsAdminController
            class: App\Entity\Teams

  #            Entity mapping
  #            - id
  #            - firstName
  #            - lastName
  #            - nickName
  #            - slogan
  #            - createdAt
  #            - updatedAt
  #            - createdBy
  #            - updatedBY
  #            - image
  #            - imageFile

            form:
                role: ROLE_WRITER
                fields:
                    -
                      type: 'group'
                      css_class: 'col-sm-6'
                      label: 'tab.teams.name'
                    -
                      property: 'firstName'
                      label: 'label.name.first'
                    -
                      property: 'lastName'
                      label: 'label.name.last'
                    -
                      property: 'nickName'
                      label: 'label.name.nick'
                    -
                      property: 'slogan'
                      label: 'label.name.slogan'

                    -
                      type: 'group'
                      css_class: 'col-sm-6'
                      label: 'tab.teams.image'
                    -
                      property: 'imageFile'
                      label: 'label.image.teams'
                      base_path: '/uploads/teams'
                      template: 'vich_uploader_image.html.twig'

            list:
                role: ROLE_VISITOR
                dql_filter: "entity.isDeleted = false"
                fields:
                    - id
                    -
                      property: 'firstName'
                      label: 'label.name.first'
                    -
                      property: 'lastName'
                      label: 'label.name.last'
                    -
                      property: 'nickName'
                      label: 'label.name.nick'
                    -
                      property: 'image'
                      label: 'label.image.teams'
                      type: 'image'
                      base_path: '/uploads/teams'
                    -
                      property: 'updatedAt'
                      label: 'label.updatedAt'
                      type: 'datetime'
                    -
                      property: 'updatedBy'
                      label: 'label.updatedBy'

            show:
                role: ROLE_VISITOR
                fields:
                    -
                      property: 'firstName'
                      label: 'label.name.first'
                    -
                      property: 'lastName'
                      label: 'label.name.last'
                    -
                      property: 'nickName'
                      label: 'label.name.nick'
                    -
                      property: 'updatedAt'
                      label: 'label.updatedAt'
                      type: 'datetime'
                    -
                      property: 'updatedBy'
                      label: 'label.updatedBy'

                    -
                      property: 'image'
                      label: 'label.image.teams'
                      type: 'image'
                      base_path: '/uploads/teams'

            new:
                role: ROLE_WRITER
                fields:
                    - property: 'imageFile'
                      type: 'vich_image'
                      type_options:
                        required: true
            edit:
                role: ROLE_WRITER
                fields:
                    - property: 'imageFile'
                      type: 'vich_image'
                      type_options:
                        required: false

            delete:
                role: ROLE_ADMIN