UnitFinancial.php 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <?php
  2. namespace App\Models;
  3. use Illuminate\Database\Eloquent\Factories\HasFactory;
  4. use Illuminate\Database\Eloquent\Model;
  5. use Illuminate\Database\Eloquent\Relations\BelongsTo;
  6. use Illuminate\Database\Eloquent\SoftDeletes;
  7. /**
  8. * @property int $id
  9. * @property int $unit_id
  10. * @property string|null $tax_regime
  11. * @property string|null $bank
  12. * @property string|null $agency
  13. * @property string|null $account
  14. * @property string|null $account_type
  15. * @property string|null $account_holder
  16. * @property string|null $pix_key
  17. * @property string|null $billing_method
  18. * @property string|null $due_date
  19. * @property string|null $financial_email
  20. * @property string|null $group
  21. * @property float|null $maintenance_fee
  22. * @property float|null $marketing_fund
  23. * @property float|null $tbr
  24. * @property \Carbon\Carbon $created_at
  25. * @property \Carbon\Carbon $updated_at
  26. * @property \Carbon\Carbon|null $deleted_at
  27. * @property-read \App\Models\Unit $unit
  28. */
  29. class UnitFinancial extends Model
  30. {
  31. use HasFactory, SoftDeletes;
  32. protected $table = 'unit_financials';
  33. protected $guarded = ['id'];
  34. protected $casts = [
  35. 'maintenance_fee' => 'decimal:2',
  36. 'marketing_fund' => 'decimal:2',
  37. 'tbr' => 'decimal:2',
  38. 'created_at' => 'datetime',
  39. 'updated_at' => 'datetime',
  40. 'deleted_at' => 'datetime',
  41. ];
  42. public function unit(): BelongsTo
  43. {
  44. return $this->belongsTo(Unit::class, 'unit_id');
  45. }
  46. }