WorkOrderProcessLog.php 735 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. namespace App;
  3. use App\Traits\ModelTimeFormat;
  4. use Illuminate\Database\Eloquent\Model;
  5. use Illuminate\Database\Eloquent\Relations\BelongsTo;
  6. class WorkOrderProcessLog extends Model
  7. {
  8. use ModelTimeFormat;
  9. protected $fillable = [
  10. 'work_order_id',
  11. 'work_order_detail_id',
  12. 'user_id',
  13. 'content',
  14. 'status',
  15. 'type', // 创建 处理 完结
  16. ];
  17. public function workOrder(): BelongsTo
  18. {
  19. return $this->belongsTo(WorkOrder::class);
  20. }
  21. public function workOrderDetail():BelongsTo
  22. {
  23. return $this->belongsTo(WorkOrderDetail::class);
  24. }
  25. public function user(): BelongsTo
  26. {
  27. return $this->belongsTo(User::class);
  28. }
  29. }