feat: clean credits users
This commit is contained in:
@@ -16,8 +16,7 @@ class PaymentTransaction extends Model
|
||||
|
||||
protected $fillable = [
|
||||
'user_id',
|
||||
'credit_product_id',
|
||||
'credit_ledger_entry_id',
|
||||
'billing_product_id',
|
||||
'type',
|
||||
'status',
|
||||
'stripe_event_id',
|
||||
@@ -30,8 +29,6 @@ class PaymentTransaction extends Model
|
||||
'stripe_price_id',
|
||||
'amount',
|
||||
'currency',
|
||||
'credits_expected',
|
||||
'credits_granted',
|
||||
'invoice_url',
|
||||
'invoice_pdf_url',
|
||||
'invoice_email_sent_at',
|
||||
@@ -45,14 +42,9 @@ class PaymentTransaction extends Model
|
||||
return $this->belongsTo(User::class);
|
||||
}
|
||||
|
||||
public function creditProduct(): BelongsTo
|
||||
public function billingProduct(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(CreditProduct::class);
|
||||
}
|
||||
|
||||
public function creditLedgerEntry(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(CreditLedgerEntry::class);
|
||||
return $this->belongsTo(BillingProduct::class);
|
||||
}
|
||||
|
||||
protected function casts(): array
|
||||
@@ -61,8 +53,6 @@ class PaymentTransaction extends Model
|
||||
'type' => PaymentTransactionType::class,
|
||||
'status' => PaymentTransactionStatus::class,
|
||||
'amount' => 'integer',
|
||||
'credits_expected' => 'integer',
|
||||
'credits_granted' => 'integer',
|
||||
'invoice_email_sent_at' => 'datetime',
|
||||
'payload' => 'array',
|
||||
'processed_at' => 'datetime',
|
||||
|
||||
Reference in New Issue
Block a user