chore: init saasshop repo + sql migrations runner + gitee go
This commit is contained in:
37
app/Models/ProductImportHistory.php
Normal file
37
app/Models/ProductImportHistory.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
class ProductImportHistory extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $fillable = [
|
||||
'scope',
|
||||
'merchant_id',
|
||||
'admin_id',
|
||||
'file_name',
|
||||
'success_count',
|
||||
'failed_count',
|
||||
'failure_file',
|
||||
'imported_at',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'imported_at' => 'datetime',
|
||||
];
|
||||
|
||||
public function merchant(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Merchant::class);
|
||||
}
|
||||
|
||||
public function admin(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Admin::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user