FranchiseeContractTaxHistory.php 827 B

123456789101112131415161718192021222324252627282930
  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. 'tbr_fixed_value_percentage' => 'decimal:4',
  12. 'marketing_fund_percentage' => 'decimal:4',
  13. 'maintance_tax_percentage' => 'decimal:4',
  14. ];
  15. public function contract(): BelongsTo
  16. {
  17. return $this->belongsTo(FranchiseeContract::class, 'franchisee_contract_id');
  18. }
  19. public function inhabitantClassification(): BelongsTo
  20. {
  21. return $this->belongsTo(InhabitantClassification::class, 'inhabitant_classification_id');
  22. }
  23. }