add projet

This commit is contained in:
root
2026-03-05 12:29:37 -05:00
parent 8d1eef8ba8
commit 23b7db1107
9109 changed files with 1106501 additions and 73 deletions
+49
View File
@@ -0,0 +1,49 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class AuthorizedUser extends Model
{
use HasFactory;
protected $table = 'authorized_users'; // Table name
protected $primaryKey = 'id';
public $incrementing = true;
protected $fillable = [
'user_id',
'authorized_user_id',
'firstname',
'lastname',
'phone_number',
'gender',
'email',
'relation_to_user',
'token',
'status',
'created_at',
'updated_at',
];
// Laravel manages created_at + updated_at automatically
public $timestamps = true;
protected $casts = [
'user_id' => 'integer',
'authorized_user_id' => 'integer',
'email' => 'string',
'firstname' => 'string',
'lastname' => 'string',
'phone_number' => 'string',
'relation_to_user' => 'string',
'token' => 'string',
'status' => 'string',
];
// Relationship: Each authorized user belongs to a user
public function user()
{
return $this->belongsTo(User::class, 'user_id');
}
}