reconstruction of the project

This commit is contained in:
root
2026-03-08 16:33:24 -04:00
parent 23b7db1107
commit c8de5f7edc
9157 changed files with 77877 additions and 1073823 deletions
+18 -2
View File
@@ -7,7 +7,10 @@ use App\Models\BaseModel;
class PaypalTransaction extends BaseModel
{
protected $table = 'paypal_transactions';
protected $primaryKey = 'id';
// ✅ CI: useTimestamps = true (created_at/updated_at)
public $timestamps = true;
protected $fillable = [
'transaction_id',
'payment_id',
@@ -26,5 +29,18 @@ class PaypalTransaction extends BaseModel
'school_year',
'semester',
];
public $timestamps = true;
protected $casts = [
'payment_id' => 'integer',
'amount' => 'decimal:2', // adjust precision if needed
'transaction_fee' => 'decimal:2', // adjust precision if needed
// raw_data is often JSON; if it's JSON in DB, cast to array
'raw_data' => 'array',
];
/* Optional relationship */
public function payment()
{
return $this->belongsTo(Payment::class, 'payment_id');
}
}