|
@@ -2,14 +2,15 @@
|
|
|
|
|
|
|
|
namespace App;
|
|
namespace App;
|
|
|
|
|
|
|
|
-use Illuminate\Database\Eloquent\Model;
|
|
|
|
|
-
|
|
|
|
|
use App\Traits\ModelLogChanging;
|
|
use App\Traits\ModelLogChanging;
|
|
|
|
|
+use App\Traits\ModelTimeFormat;
|
|
|
|
|
+use Illuminate\Database\Eloquent\Model;
|
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
|
|
|
|
class DemandProcess extends Model
|
|
class DemandProcess extends Model
|
|
|
{
|
|
{
|
|
|
use ModelLogChanging;
|
|
use ModelLogChanging;
|
|
|
|
|
+ use ModelTimeFormat;
|
|
|
|
|
|
|
|
protected $fillable = ['demand_id', 'processor', 'explain'];
|
|
protected $fillable = ['demand_id', 'processor', 'explain'];
|
|
|
|
|
|
|
@@ -18,7 +19,7 @@ class DemandProcess extends Model
|
|
|
return $this->belongsTo(Demand::class);
|
|
return $this->belongsTo(Demand::class);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- public function processor(): BelongsTo
|
|
|
|
|
|
|
+ public function user(): BelongsTo
|
|
|
{
|
|
{
|
|
|
return $this->belongsTo(User::class, 'processor', 'id');
|
|
return $this->belongsTo(User::class, 'processor', 'id');
|
|
|
}
|
|
}
|