save to codehub
This commit is contained in:
64
app/Models/ActivityDay.php
Normal file
64
app/Models/ActivityDay.php
Normal file
@@ -0,0 +1,64 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use App\Models\SubscriptionMaster;
|
||||
use App\Models\Teacher;
|
||||
use App\Models\ActivitySchedule;
|
||||
use App\Models\LinkFaqActivityMasterIds;
|
||||
use App\Models\ActivityMaster;
|
||||
|
||||
class ActivityDay extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
use SoftDeletes;
|
||||
protected $dates = ['deleted_at'];
|
||||
protected $table = 'activity_day';
|
||||
// protected $fillable = [
|
||||
// 'activity_master_id',
|
||||
// 'activity_schedule_id',
|
||||
// 'activity_name',
|
||||
// 'activity_teaser',
|
||||
// 'activity_duration',
|
||||
// 'activity_level',
|
||||
// 'description',
|
||||
// 'benefits',
|
||||
// 'date',
|
||||
// 'day',
|
||||
// 'time',
|
||||
// 'pre_requisites',
|
||||
// 'zoom_link',
|
||||
// 'subscription_id',
|
||||
// 'is_active',
|
||||
// ];
|
||||
|
||||
protected $guarded = [];
|
||||
|
||||
public function schedule()
|
||||
{
|
||||
return $this->hasMany(ActivitySchedule::class, 'activity_master_id');
|
||||
}
|
||||
public function subscription(){
|
||||
return $this->belongsTo(SubscriptionMaster::class, 'subscription_id', 'id');
|
||||
}
|
||||
|
||||
public function teacher_data(){
|
||||
return $this->belongsTo(Teacher::class,'teacher_id','id');
|
||||
}
|
||||
public function faq_activity_link() {
|
||||
return $this->hasMany(LinkFaqActivityMasterIds::class, 'activity_master_id', 'id');
|
||||
}
|
||||
|
||||
public function scheduleData()
|
||||
{
|
||||
return $this->hasMany(ActivitySchedule::class, 'id', 'activity_schedule_id');
|
||||
}
|
||||
|
||||
public function activityData()
|
||||
{
|
||||
return $this->hasMany(ActivityMaster::class, 'id', 'activity_master_id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user