feat: implement admin management
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class AdminAvatar
|
||||
*
|
||||
* @property int $id
|
||||
* @property int|null $file_id
|
||||
* @property int $admin_id
|
||||
* @property Carbon $created_at
|
||||
*
|
||||
* @property Admin $admin
|
||||
* @property File|null $file
|
||||
*
|
||||
* @package App\Models
|
||||
*/
|
||||
class AdminAvatar extends Model
|
||||
{
|
||||
protected $table = 'admin_avatars';
|
||||
|
||||
public static $snakeAttributes = false;
|
||||
|
||||
protected $casts = [
|
||||
'file_id' => 'int',
|
||||
'admin_id' => 'int'
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'file_id',
|
||||
'admin_id'
|
||||
];
|
||||
|
||||
public function admin()
|
||||
{
|
||||
return $this->belongsTo(Admin::class);
|
||||
}
|
||||
|
||||
public function file()
|
||||
{
|
||||
return $this->belongsTo(File::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user