OwnerPriceSystem.php 610 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. namespace App;
  3. use Illuminate\Database\Eloquent\Model;
  4. use App\Traits\ModelLogChanging;
  5. class OwnerPriceSystem extends Model
  6. {
  7. use ModelLogChanging;
  8. protected $fillable=[
  9. "owner_id","usage_fee","operation","target_id","tax_rate_id","time_unit_id"
  10. ];
  11. public function timeUnit()
  12. { //时间单位
  13. return $this->belongsTo(Unit::class,"time_unit_id","id");
  14. }
  15. public function taxRate()
  16. { //税率
  17. return $this->belongsTo(TaxRate::class);
  18. }
  19. public function owner()
  20. { //货主
  21. return $this->belongsTo(Owner::class);
  22. }
  23. }