mirror of
https://github.com/Bigherollc/wticreatorstudio.git
synced 2026-07-30 20:16:46 -04:00
37 lines
921 B
PHP
37 lines
921 B
PHP
<?php
|
|
|
|
namespace Modules\Subscription\Entities;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Modules\Product\Entities\Product;
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
use App\Models\User;
|
|
|
|
class SubscriptionCouponRedemption extends Model
|
|
{
|
|
|
|
use SoftDeletes;
|
|
protected $dates = ['deleted_at'];
|
|
|
|
protected $table = 'subscription_coupon_redemptions';
|
|
protected $guarded = ['id'];
|
|
protected $fillable = [
|
|
'subscription_coupon_id',
|
|
'customer_id',
|
|
'subscription_id',
|
|
'alacarte_order_id',
|
|
];
|
|
|
|
public function user() {
|
|
return $this->belongsTo(User::class, 'customer_id', 'id');
|
|
}
|
|
|
|
public function coupon() {
|
|
return $this->belongsTo(SubscriptionCoupon::class, 'subscription_coupon_id', 'id');
|
|
}
|
|
|
|
public function subscription() {
|
|
return $this->belongsTo(CustomerSubscription::class, 'subscription_id', 'id');
|
|
}
|
|
}
|