Pruefzaehler + Pruefkontingent (Decision-Update Phase-2 vorgezogen)
Eigener Pruef-Zaehler, getrennt von der Credit-Wallet (Paragraph 4.2/4.3): - review_checks Ledger (eine Zeile je Pruefung, source free|credit, charged_credits), aggregiert pro Account/Monat statt pro PM - ReviewCheckService: Tageslimit (harte Bremse, nicht freikaufbar) -> Monats-Freikontingent (tier-gestaffelt 4/12/30/60/120) -> Overflow zieht 1 Credit/Pruefung aus der Wallet - ReviewLimitException fuer das erreichte Tageslimit Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
b63cd26326
commit
3e8844245d
8 changed files with 387 additions and 0 deletions
27
database/factories/ReviewCheckFactory.php
Normal file
27
database/factories/ReviewCheckFactory.php
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use App\Enums\ReviewCheckSource;
|
||||
use App\Models\ReviewCheck;
|
||||
use App\Models\User;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/**
|
||||
* @extends Factory<ReviewCheck>
|
||||
*/
|
||||
class ReviewCheckFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'user_id' => User::factory(),
|
||||
'press_release_id' => null,
|
||||
'source' => ReviewCheckSource::Free,
|
||||
'charged_credits' => 0,
|
||||
];
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue