first commit

This commit is contained in:
furen81
2026-01-23 19:18:52 +07:00
commit 6e681c4ad3
80 changed files with 13874 additions and 0 deletions

63
app/Models/User.php Normal file
View File

@ -0,0 +1,63 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use MongoDB\Laravel\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
use Illuminate\Database\Eloquent\Relations\HasMany;
class User extends Authenticatable
{
use HasFactory, Notifiable;
/**
* The attributes that are mass assignable.
*/
protected $fillable = [
'employee_id',
'name',
'email',
'password',
'phone',
'color',
'role',
'is_active',
];
/**
* The attributes that should be hidden for serialization.
*/
protected $hidden = [
'password',
'remember_token',
];
/**
* Get the attributes that should be cast.
*/
protected function casts(): array
{
return [
'email_verified_at' => 'datetime',
'password' => 'hashed',
'is_active' => 'boolean',
];
}
/**
* Get the sales routes for the user.
*/
public function salesRoutes(): HasMany
{
return $this->hasMany(SalesRoute::class);
}
/**
* Get the sales plans for the user.
*/
public function salesPlans(): HasMany
{
return $this->hasMany(SalesPlan::class);
}
}