| 123456789101112131415161718192021222324252627 |
- <?php
- namespace App;
- use App\Traits\ModelLogChanging;
- use App\Traits\ModelTimeFormat;
- use Illuminate\Database\Eloquent\Model;
- use Illuminate\Database\Eloquent\Relations\BelongsTo;
- class DemandProcess extends Model
- {
- use ModelLogChanging;
- use ModelTimeFormat;
- protected $fillable = ['demand_id', 'processor', 'explain'];
- public function demand(): BelongsTo
- {
- return $this->belongsTo(Demand::class);
- }
- public function user(): BelongsTo
- {
- return $this->belongsTo(User::class, 'processor', 'id');
- }
- }
|