MetadataProgramNotification.php 916 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. namespace App\Model;
  3. use Illuminate\Database\Eloquent\Model;
  4. use App\Model\Privillage\Role;
  5. use App\Model\MetadatProgram;
  6. use Auth;
  7. use Illuminate\Database\Eloquent\SoftDeletes;
  8. class MetadataProgramNotification extends Model
  9. {
  10. protected $table = 'metadata_program_notification';
  11. protected $fillable = [
  12. 'id',
  13. 'id_tahun_program',
  14. 'id_template_program',
  15. 'id_template_program_detail',
  16. 'id_upt',
  17. 'message',
  18. 'readable_admin',
  19. 'readable',
  20. 'created_by',
  21. 'updated_by',
  22. 'created_at',
  23. 'updated_at',
  24. ];
  25. public function metadataProgramNotificationRead(){
  26. return $this->hasMany('App\Model\MetadataProgramNotificationRead','id_metadata_program_notification');
  27. }
  28. public function templateProgram(){
  29. return $this->belongsTo('App\Model\TemplateProgram','id_template_program');
  30. }
  31. }