<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

/**
 * PRC-135 — past password hashes for admins + clients. Enforces
 * "no reuse of last N passwords" policy via PasswordHistoryService.
 */
class PasswordHistory extends Model
{
    public const TYPE_ADMIN = 'admin';

    public const TYPE_CLIENT = 'client';

    public $timestamps = false;

    protected $table = 'password_history';

    protected $fillable = [
        'user_type',
        'user_id',
        'password_hash',
        'created_at',
    ];

    protected $casts = [
        'created_at' => 'datetime',
    ];
}
