<?php

namespace App;

use App\Traits\ModelTimeFormat;
use Illuminate\Database\Eloquent\Model;

use App\Traits\ModelLogChanging;

class CustomerLog extends Model
{
    use ModelLogChanging;

    use ModelTimeFormat;

    protected $fillable = ['customer_id', 'customer_log_status_id', 'user_id', 'description'];
    protected $guarded = ['id'];


    public function status()
    {   //状态
        return $this->belongsTo(CustomerLogStatus::class,"customer_log_status_id","id");
    }

    public function user()
    {
        return $this->belongsTo(User::class);
    }

    public function customer()
    {
        return $this->belongsTo(Customer::class);
    }
}
