Repository URL to install this package:
|
Version:
0.2.0 ▾
|
<?php namespace Modules\Courses\Entities;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use Prettus\Repository\Contracts\Presentable;
use Prettus\Repository\Traits\PresentableTrait;
/**
* Modules\Courses\Entities\Analytic
*
* @property integer $id
* @property string $title
* @property string $slide_photo
* @property integer $order
* @property boolean $is_active
* @property integer $course_id
* @property \Carbon\Carbon $created_at
* @property \Carbon\Carbon $updated_at
* @property string $deleted_at
* @property-read \Modules\Courses\Entities\Course $course
*/
class Analytic extends Model implements Presentable {
use PresentableTrait,
SoftDeletes;
/**
* The database table used by the model.
*
* @var string
*/
protected $table = 'analytics';
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = ['student_id', 'slide_id', 'course_id', 'seconds'];
/**
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
*/
public function student()
{
return $this->belongsTo('Modules\Students\Entities\Student');
}
/**
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
*/
public function slide()
{
return $this->belongsTo('Modules\Courses\Entities\Slide');
}
/**
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
*/
public function course()
{
return $this->belongsTo('Modules\Courses\Entities\Course');
}
}