Files
BarangaySystem/app/Models/Market/StoreManager.php
2026-06-06 18:43:00 +08:00

47 lines
834 B
PHP

<?php
declare(strict_types=1);
namespace App\Models\Market;
use App\Models\Model;
use App\Models\User;
class StoreManager extends Model
{
protected ?string $table = 'store_managers';
protected array $fillable = [
'hashkey',
'store_id',
'user_id',
'created_by',
'updated_by',
'is_active',
];
protected array $casts = [
'is_active' => 'boolean',
];
public function store()
{
return $this->belongsTo(Store::class, 'store_id');
}
public function user()
{
return $this->belongsTo(User::class, 'user_id');
}
public function creator()
{
return $this->belongsTo(User::class, 'created_by');
}
public function updater()
{
return $this->belongsTo(User::class, 'updated_by');
}
}