35 lines
662 B
PHP
35 lines
662 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
class StockBatchFile extends Model
|
|
{
|
|
protected $table = 'stock_batch_files';
|
|
|
|
protected $fillable = [
|
|
'filename',
|
|
'file_data',
|
|
'file_type',
|
|
'stock_batch_id',
|
|
'user_id',
|
|
];
|
|
|
|
protected $casts = [
|
|
'created_at' => 'datetime',
|
|
'updated_at' => 'datetime',
|
|
];
|
|
|
|
public function stockBatch(): BelongsTo
|
|
{
|
|
return $this->belongsTo(StockBatch::class);
|
|
}
|
|
|
|
public function user(): BelongsTo
|
|
{
|
|
return $this->belongsTo(User::class);
|
|
}
|
|
}
|