57 lines
985 B
PHP
57 lines
985 B
PHP
<?php
|
|
|
|
/**
|
|
* Created by Reliese Model.
|
|
*/
|
|
|
|
namespace App\Models;
|
|
use App\Enums\AdminStatus;
|
|
use Illuminate\Foundation\Auth\User as Authenticatable;
|
|
use Carbon\Carbon;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
/**
|
|
* Class Admin
|
|
*
|
|
* @property int $id
|
|
* @property int|null $file_id
|
|
* @property string $first_name
|
|
* @property string $last_name
|
|
* @property string $email
|
|
* @property string $password
|
|
* @property int $status
|
|
* @property Carbon $created_at
|
|
* @property Carbon $updated_at
|
|
*
|
|
* @package App\Models
|
|
*/
|
|
class Admin extends Authenticatable
|
|
{
|
|
protected $table = 'admins';
|
|
public static $snakeAttributes = false;
|
|
|
|
protected $casts = [
|
|
'file_id' => 'int',
|
|
'status' => AdminStatus::class,
|
|
];
|
|
|
|
protected $hidden = [
|
|
'password'
|
|
];
|
|
|
|
protected $fillable = [
|
|
'file_id',
|
|
'first_name',
|
|
'last_name',
|
|
'email',
|
|
'username',
|
|
'password',
|
|
'status'
|
|
];
|
|
|
|
public function file()
|
|
{
|
|
return $this->belongsTo(File::class, 'file_id');
|
|
}
|
|
}
|