<?php

namespace App\Model\Raharja;

use Illuminate\Database\Eloquent\Model;

class UserReceive extends Model
{
    //protected $connection = 'connection-name'; //jika menggunakan 2 DB modelnya harus dikasih ini
    //protected $primaryKey = 'your_key_name'; // set primarykeymu jika bukan ID
    protected $table = 'user_receive';
    protected $fillable = [
        'message_id',
        'user_id',
        'is_check',
    ];

    public function getMessage(){
        return $this->belongsTo(Message::class, 'message_id', 'id');
    }
    //public $incrementing = false; //jika primary keynya string
    //public $timestamps = false; //matiin created_at, updated_at
}
