2018-08-29 15:18:15 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Models;
|
|
|
|
|
|
|
|
use App\Models\File;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
2022-08-10 09:18:10 +00:00
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
2018-08-29 15:18:15 +00:00
|
|
|
|
|
|
|
class HashValue extends Model
|
|
|
|
{
|
2022-08-10 09:18:10 +00:00
|
|
|
use HasFactory;
|
2018-08-29 15:18:15 +00:00
|
|
|
protected $table = 'file_hashvalues';
|
|
|
|
public $timestamps = false;
|
|
|
|
|
2019-09-06 14:35:43 +00:00
|
|
|
protected $primaryKey = ['file_id', 'type'];
|
|
|
|
public $incrementing = false;
|
|
|
|
|
2018-08-29 15:18:15 +00:00
|
|
|
public function file()
|
|
|
|
{
|
|
|
|
return $this->belongsTo(File::class, 'file_id', 'id');
|
|
|
|
}
|
|
|
|
}
|