2018-12-13 10:23:21 +11:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace Modules\Notes\Entities;
|
|
|
|
|
|
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
|
|
|
|
|
|
class Note extends Model
|
|
|
|
|
{
|
2018-12-13 22:01:33 +11:00
|
|
|
/*
|
2018-12-13 10:23:21 +11:00
|
|
|
protected $guarded = [
|
|
|
|
|
'id',
|
|
|
|
|
];
|
2018-12-13 22:01:33 +11:00
|
|
|
*/
|
|
|
|
|
protected $fillable = ["description"];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
protected $table = 'notes';
|
2018-12-13 10:23:21 +11:00
|
|
|
|
|
|
|
|
public function client()
|
|
|
|
|
{
|
2018-12-13 22:01:33 +11:00
|
|
|
return $this->hasOne(App\Models\Client::class);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function notes()
|
|
|
|
|
{
|
|
|
|
|
return $this->hasMany(Note::class);
|
2018-12-13 10:23:21 +11:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|