first commit
Some checks failed
linter / quality (push) Has been cancelled
tests / ci (push) Has been cancelled

This commit is contained in:
2025-04-23 00:14:33 +06:00
commit 356f56eebd
197 changed files with 21536 additions and 0 deletions

24
app/Models/Approval.php Normal file
View File

@@ -0,0 +1,24 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Approval extends Model
{
protected $casts = [
'metadata' => 'array',
'step' => ApprovalStep::class
];
public function transitionTo($status, $comment = null)
{
$this->update([
'status' => $status,
'comment' => $comment,
'completed_at' => now()
]);
$this->document->notifyApprovers();
}
}