ImportBatch.php 964 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <?php
  2. namespace Webkul\DataTransfer\Models;
  3. use Illuminate\Database\Eloquent\Model;
  4. use Webkul\DataTransfer\Contracts\ImportBatch as ImportBatchContract;
  5. class ImportBatch extends Model implements ImportBatchContract
  6. {
  7. /**
  8. * Indicates if the model should be timestamped.
  9. *
  10. * @var bool
  11. */
  12. public $timestamps = false;
  13. /**
  14. * The attributes that are mass assignable.
  15. *
  16. * @var array
  17. */
  18. protected $fillable = [
  19. 'state',
  20. 'data',
  21. 'summary',
  22. 'import_id',
  23. ];
  24. /**
  25. * The attributes that should be cast.
  26. *
  27. * @var array
  28. */
  29. protected $casts = [
  30. 'summary' => 'array',
  31. 'data' => 'array',
  32. ];
  33. /**
  34. * Get the import that owns the import batch.
  35. *
  36. * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
  37. */
  38. public function import()
  39. {
  40. return $this->belongsTo(ImportProxy::modelClass());
  41. }
  42. }