49 lines
755 B
PHP
49 lines
755 B
PHP
<?php
|
|
|
|
/**
|
|
* Created by Reliese Model.
|
|
*/
|
|
|
|
namespace App\Models;
|
|
|
|
use Carbon\Carbon;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
/**
|
|
* Class DcFileTag
|
|
*
|
|
* @property int $id
|
|
* @property int $file_id
|
|
* @property int $tag_id
|
|
* @property Carbon|null $created_at
|
|
* @property Carbon|null $updated_at
|
|
*
|
|
* @property DcFile $dc_file
|
|
* @property DcTag $dc_tag
|
|
*
|
|
* @package App\Models
|
|
*/
|
|
class DcFileTag extends Model
|
|
{
|
|
protected $table = 'dc_file_tags';
|
|
|
|
protected $casts = [
|
|
'file_id' => 'int',
|
|
'tag_id' => 'int'
|
|
];
|
|
|
|
protected $fillable = [
|
|
'file_id',
|
|
'tag_id'
|
|
];
|
|
|
|
public function dc_file()
|
|
{
|
|
return $this->belongsTo(DcFile::class, 'file_id');
|
|
}
|
|
|
|
public function dc_tag()
|
|
{
|
|
return $this->belongsTo(DcTag::class, 'tag_id');
|
|
}
|
|
}
|