You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
515 B

  1. <?php
  2. namespace App\Models;
  3. use App\Models\Model;
  4. class Cost extends Model
  5. {
  6. public const USER_TYPE = 'users';
  7. public const FILE_TYPE = 'files';
  8. public $perPage = 12;
  9. protected $fillable = [
  10. 'business_id', 'type', 'month', 'amount', 'fee', 'duration','cost','tax', 'additional'
  11. ];
  12. public $casts = [
  13. 'additional' => 'array',
  14. 'tax' => 'float',
  15. ];
  16. public function business()
  17. {
  18. return $this->belongsTo(Business::class, 'business_id');
  19. }
  20. }