<?php  namespace App\Models;  use App\Observers\DiscountObserver; use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\Relations\HasMany;  class Discount extends Model { 	protected $casts = [ 		'active' => 'boolean', 		'valid_from' => 'date', 		'valid_to' => 'date', 	];  	protected static function initObservers(): string 	{ 		return DiscountObserver::class; 	}  	public function orders(): HasMany{}  	public function scopeAvaliable(Builder $query): Builder{}  	public function isUsable(): bool{}  	public function getDiscountAmount(float $total): float{}  	/** 	 * Percentage based calculation. 	 * Returns total amount - discount percentage of that amount. 	 */ 	public function calculate(float $total): float{} }