Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
n/a
0 / 0
n/a
0 / 0
CRAP
n/a
0 / 0
TblZeusBridgeLog
n/a
0 / 0
n/a
0 / 0
0
n/a
0 / 0
1<?php
2
3namespace App\Models;
4
5use Illuminate\Database\Eloquent\Model;
6
7/**
8 * One row per Titan → Zeus forward attempt.
9 *
10 * This is the trial's audit trail: which third party sent what, where it was
11 * routed, and whether Zeus took it. It is what makes the bridge reversible —
12 * switch it off and the failed/rejected rows are the exact list of Madrid
13 * operations that need reconciling on the Zeus side.
14 *
15 * Skipped operations are NOT logged: every non-Madrid call would produce a row
16 * and drown the table.
17 */
18class TblZeusBridgeLog extends Model
19{
20    /** Zeus accepted the operation (2xx). */
21    public const STATUS_FORWARDED = 'forwarded';
22
23    /** Zeus answered but refused it (4xx/5xx). */
24    public const STATUS_REJECTED = 'rejected';
25
26    /** Zeus never answered — timeout, connection error, auth failure. */
27    public const STATUS_FAILED = 'failed';
28
29    protected $table = 'tbl_zeus_bridge_log';
30
31    public $timestamps = false;
32
33    protected $fillable = [
34        'auth_user_id',
35        'titan_path',
36        'zeus_path',
37        'region',
38        'company_id',
39        'quotation_id',
40        'zeus_quotation_id',
41        'mode',
42        'status',
43        'http_status',
44        'payload',
45        'file_fields',
46        'response_body',
47        'error',
48        'duration_ms',
49        'created_at',
50        'updated_at',
51    ];
52
53    protected $casts = [
54        'auth_user_id' => 'integer',
55        'company_id' => 'integer',
56        'quotation_id' => 'integer',
57        'zeus_quotation_id' => 'integer',
58        'http_status' => 'integer',
59        'duration_ms' => 'integer',
60    ];
61}