You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
941 B
43 lines
941 B
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
class DemandHandleLog extends Model
|
|
{
|
|
protected $fillable = [
|
|
'demand_id',
|
|
'admin_user_id',
|
|
'status_dict_item_id',
|
|
'content',
|
|
'next_plan',
|
|
'next_follow_date',
|
|
'handled_at',
|
|
];
|
|
|
|
protected $casts = [
|
|
'demand_id' => 'integer',
|
|
'admin_user_id' => 'integer',
|
|
'status_dict_item_id' => 'integer',
|
|
'next_follow_date' => 'date',
|
|
'handled_at' => 'date',
|
|
];
|
|
|
|
public function demand(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Demand::class);
|
|
}
|
|
|
|
public function adminUser(): BelongsTo
|
|
{
|
|
return $this->belongsTo(AdminUser::class, 'admin_user_id');
|
|
}
|
|
|
|
public function statusItem(): BelongsTo
|
|
{
|
|
return $this->belongsTo(DictItem::class, 'status_dict_item_id');
|
|
}
|
|
}
|