{{{
  exports({ to: filepath })
}}}
// import type { QueueNames } from '#config/jobs'
import { inject } from '@adonisjs/core'
import { Dispatchable } from '@eienjs/adonisjs-jobs'

@inject()
export default class {{ entity.name }}Job extends Dispatchable {
  // Optional: Specify custom queue (autocomplete enabled if declared in config)
  // If not specified, uses defaultQueue from config (default: 'default')
  // static queue: QueueNames = 'emails'

  // Optional: Override auto-generated job name
  // static jobName = 'custom-job-name'

  // Optional: All pg-boss work options in one object
  // static workOptions = {
  //   batchSize: 10,        // Process jobs in batches
  //   teamSize: 5,          // Worker concurrency
  //   priority: 10,         // Higher = more important
  //   retryLimit: 5,        // Max retry attempts
  //   retryDelay: 60,       // Seconds between retries
  //   expireInHours: 2,     // Job expiration
  // }

  async handle(payload: unknown) {
    // Implement your queue job logic here
    this.logger.info('Processing {{ entityName }} job', payload)

    // Example: Process the job
    // await someService.processData(payload)

    // Return success (job will be marked as completed)
    // Throw an error to mark job as failed and trigger retry
  }
}
