App\CoreBundle\Entity\BatchJobs:
  type: entity
  table: batch_jobs
  indexes:
    execution_ended_idx:
      columns: [ execution_ended ]
    is_locked_idx:
      columns: [ is_locked ]
    in_progress_idx:
      columns: [ in_progress ]
    success_idx:
      columns: [ success ]
    fail_count_idx:
      columns: [ fail_count ]
    created_at_idx:
      columns: [ created_at ]
  repositoryClass: App\CoreBundle\Repository\BatchJobsRepository
  id:
    id:
      type: string
      unique: true
      generator:
        strategy: CUSTOM
      customIdGenerator:
        class: Ramsey\Uuid\Doctrine\UuidGenerator
  fields:
    php_script:
      type: text
    site_host:
      type: string
      length: 100
      nullable: true
    execution_started:
      type: datetime
      nullable: true
    execution_ended:
      type: datetime
      nullable: true
    is_locked:
      type: boolean
      options:
          default: 0
    in_progress:
      type: boolean
      options:
          default: 0
    success:
      type: boolean
      options:
          default: 0
    failed:
      type: boolean
      options:
          default: 0
    fail_count:
      type: boolean
      options:
          default: 0
    job_priority:
      type: integer
      nullable: true
      options:
          default: 1000
    created_by:
      type: string
      length: 255
      nullable: true
    created_at:
      type: datetime
    updated_at:
      type: datetime
      nullable: true
  lifecycleCallbacks:
    prePersist: [ setCreatedAtValue ]
    preUpdate: [ setUpdatedAtValue ]