CaiWuXiTong/app/Models/Business/CourierSurchargeAuditLog.php

45 lines
910 B
PHP

<?php
namespace App\Models\Business;
use App\Abstracts\Model;
class CourierSurchargeAuditLog extends Model
{
public const ACTION_CREATED = 'created';
public const ACTION_UPDATED = 'updated';
public const ACTION_ACTIVATED = 'activated';
public const ACTION_DEACTIVATED = 'deactivated';
public const TARGET_QUOTE = 'quote';
public const TARGET_TYPE = 'type';
protected $table = 'business_courier_surcharge_audit_logs';
protected $fillable = [
'company_id',
'actor_id',
'action',
'target_type',
'target_id',
'target_label',
'changes',
];
protected $casts = [
'company_id' => 'integer',
'actor_id' => 'integer',
'target_id' => 'integer',
'changes' => 'array',
];
public function actor()
{
return $this->belongsTo(user_model_class(), 'actor_id');
}
}