WorkOrderProcessLog.php 749 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  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. 'tag'
  17. ];
  18. public function workOrder(): BelongsTo
  19. {
  20. return $this->belongsTo(WorkOrder::class);
  21. }
  22. public function workOrderDetail():BelongsTo
  23. {
  24. return $this->belongsTo(WorkOrderDetail::class);
  25. }
  26. public function user(): BelongsTo
  27. {
  28. return $this->belongsTo(User::class);
  29. }
  30. }