save to codehub
This commit is contained in:
36
app/Models/SubscriptionPlanPackage.php
Normal file
36
app/Models/SubscriptionPlanPackage.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use App\Models\SubscriptionPackageDescription;
|
||||
use App\Models\SubscriptionMaster;
|
||||
|
||||
class SubscriptionPlanPackage extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
use SoftDeletes;
|
||||
|
||||
protected $dates = ['deleted_at'];
|
||||
protected $table = 'subscription_plan_packages';
|
||||
protected $fillable = [
|
||||
'subscription_master_id',
|
||||
'plan_period',
|
||||
'plan_price',
|
||||
'currency_type',
|
||||
'is_active'
|
||||
];
|
||||
|
||||
public function SubscriptionMaster() {
|
||||
|
||||
return $this->belongsTo(SubscriptionMaster::class,'plan_id');
|
||||
}
|
||||
|
||||
public function subscription_package_descriptions() {
|
||||
|
||||
return $this->hasOne(SubscriptionPackageDescription::class, 'plan_id');
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user