LaborCompany.php 680 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. namespace App;
  3. use App\Traits\ModelTimeFormat;
  4. use Illuminate\Database\Eloquent\Model;
  5. use App\Traits\ModelLogChanging;
  6. use Illuminate\Database\Eloquent\Relations\BelongsTo;
  7. class LaborCompany extends Model
  8. {
  9. use ModelLogChanging;
  10. use ModelTimeFormat;
  11. protected $fillable = [
  12. 'id',
  13. 'name',//名称
  14. 'warehouse_id',//仓库ID
  15. 'priority',//优先级 数字越大优先级越高
  16. 'mail',//邮箱
  17. 'man_num',//男工人数
  18. 'woman_num',//女工人数
  19. ];
  20. /**
  21. * @return BelongsTo
  22. */
  23. public function warehouse(): BelongsTo
  24. {
  25. return $this->belongsTo(Warehouse::class);
  26. }
  27. }