Port tables, APIs, and overdue cron from goldali, default the flag off, and keep customer routes behind auth. Co-authored-by: Cursor <cursoragent@cursor.com>
34 lines
645 B
PHP
34 lines
645 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
class GoldCreditRequest extends Model
|
|
{
|
|
protected $fillable = [
|
|
'customer_id',
|
|
'requested_gold',
|
|
'requested_months',
|
|
'note',
|
|
'status',
|
|
'admin_note',
|
|
'gold_credit_id',
|
|
];
|
|
|
|
protected $casts = [
|
|
'requested_gold' => 'float',
|
|
];
|
|
|
|
public function customer(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Customer::class);
|
|
}
|
|
|
|
public function goldCredit(): BelongsTo
|
|
{
|
|
return $this->belongsTo(GoldCredit::class);
|
|
}
|
|
}
|