FranchiseeContractTaxHistory.php 771 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. namespace App\Models;
  3. use Illuminate\Database\Eloquent\Model;
  4. use Illuminate\Database\Eloquent\Relations\BelongsTo;
  5. class FranchiseeContractTaxHistory extends Model
  6. {
  7. protected $table = 'franchisee_contract_tax_histories';
  8. protected $guarded = ['id'];
  9. protected $casts = [
  10. 'tbr_fixed_value' => 'decimal:2',
  11. 'marketing_fund_percentage' => 'decimal:4',
  12. 'maintance_tax_percentage' => 'decimal:4',
  13. ];
  14. public function contract(): BelongsTo
  15. {
  16. return $this->belongsTo(FranchiseeContract::class, 'franchisee_contract_id');
  17. }
  18. public function inhabitantClassification(): BelongsTo
  19. {
  20. return $this->belongsTo(InhabitantClassification::class, 'inhabitant_classification_id');
  21. }
  22. }