Sync deploy mirror and upstream error page
This commit is contained in:
43
.deploy/artwork-evolution-release/app/Models/UploadBatch.php
Normal file
43
.deploy/artwork-evolution-release/app/Models/UploadBatch.php
Normal file
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
|
||||
final class UploadBatch extends Model
|
||||
{
|
||||
public const STATUS_UPLOADING = 'uploading';
|
||||
public const STATUS_PROCESSING = 'processing';
|
||||
public const STATUS_COMPLETED = 'completed';
|
||||
public const STATUS_COMPLETED_WITH_ERRORS = 'completed_with_errors';
|
||||
public const STATUS_CANCELLED = 'cancelled';
|
||||
|
||||
protected $fillable = [
|
||||
'user_id',
|
||||
'name',
|
||||
'status',
|
||||
'total_items',
|
||||
'processed_items',
|
||||
'failed_items',
|
||||
'published_items',
|
||||
'defaults_json',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'defaults_json' => 'array',
|
||||
];
|
||||
|
||||
public function user(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(User::class);
|
||||
}
|
||||
|
||||
public function items(): HasMany
|
||||
{
|
||||
return $this->hasMany(UploadBatchItem::class)->orderBy('id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user