OwnerStoreOutFeeDetail.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <?php
  2. namespace App;
  3. use Illuminate\Database\Eloquent\Model;
  4. use App\Traits\ModelLogChanging;
  5. use Illuminate\Database\Eloquent\Relations\BelongsTo;
  6. class OwnerStoreOutFeeDetail extends Model
  7. {
  8. use ModelLogChanging;
  9. public $fillable = [
  10. 'owner_fee_detail_id',//
  11. 'commodity_id',//
  12. 'owner_id',//
  13. 'source_bill', // 上游单号
  14. 'unit_price', //价格
  15. 'unit_id', //
  16. 'amount',//数量
  17. 'step',//阶梯
  18. 'price_remark',//价格描述
  19. 'tax_fee',//税费
  20. 'sku',//商家编码
  21. 'packingMaterialFee',//耗材费
  22. 'barcode',//商品条码
  23. 'work_name',//作业名称
  24. 'fee',//费用
  25. ];
  26. public function ownerFeeDetail(): BelongsTo
  27. {
  28. return $this->belongsTo(OwnerFeeDetail::class);
  29. }
  30. public function commodity(): BelongsTo
  31. {
  32. return $this->belongsTo(Commodity::class);
  33. }
  34. public function owner(): BelongsTo
  35. {
  36. return $this->belongsTo(Owner::class);
  37. }
  38. public function unit(): BelongsTo
  39. {
  40. return $this->belongsTo(Unit::class);
  41. }
  42. }