51 lines
754 B
PHP
51 lines
754 B
PHP
<?php
|
|
|
|
/**
|
|
* Created by Reliese Model.
|
|
*/
|
|
|
|
namespace App\Models;
|
|
|
|
use Carbon\Carbon;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
/**
|
|
* Class UserAvatar
|
|
*
|
|
* @property int $id
|
|
* @property int $file_id
|
|
* @property int $user_id
|
|
* @property Carbon $created_at
|
|
* @property Carbon $updated_at
|
|
*
|
|
* @property File $file
|
|
* @property User $user
|
|
*
|
|
* @package App\Models
|
|
*/
|
|
class UserAvatar extends Model
|
|
{
|
|
protected $table = 'user_avatars';
|
|
public static $snakeAttributes = false;
|
|
|
|
protected $casts = [
|
|
'file_id' => 'int',
|
|
'user_id' => 'int'
|
|
];
|
|
|
|
protected $fillable = [
|
|
'file_id',
|
|
'user_id'
|
|
];
|
|
|
|
public function file()
|
|
{
|
|
return $this->belongsTo(File::class);
|
|
}
|
|
|
|
public function user()
|
|
{
|
|
return $this->belongsTo(User::class);
|
|
}
|
|
}
|