OwnerStoreOutFeeReport.php 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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 OwnerStoreOutFeeReport extends Model
  7. {
  8. use ModelLogChanging;
  9. public $fillable = [
  10. 'owner_bill_report_id',
  11. 'counting_month',
  12. 'step', //阶梯
  13. 'unit_id',
  14. 'unit_price',//单价
  15. 'amount', //数量
  16. 'owner_id',
  17. 'work_name',//作业名称
  18. 'fee',//费用
  19. 'model_id',//计费模型
  20. 'tax_fee',//税费
  21. ];
  22. public $timestamps = false;
  23. public function ownerBillReport(): BelongsTo
  24. {
  25. return $this->belongsTo(OwnerBillReport::class);
  26. }
  27. public function unit(): BelongsTo
  28. {
  29. return $this->belongsTo(Unit::class);
  30. }
  31. public function owner(): BelongsTo
  32. {
  33. return $this->belongsTo(Owner::class);
  34. }
  35. public function model(): BelongsTo
  36. {
  37. return $this->belongsTo(OwnerPriceOperation::class, 'model_id', 'id');
  38. }
  39. }