1 | <?php |
||
9 | class PlanInterval extends Model implements PlanIntervalContract |
||
10 | { |
||
11 | protected $table = 'plan_intervals'; |
||
12 | |||
13 | protected $fillable = [ |
||
14 | 'price', 'interval', 'interval_unit', |
||
15 | ]; |
||
16 | |||
17 | public static $DAY = 'day'; |
||
18 | public static $MONTH = 'month'; |
||
19 | public static $YEAR = 'year'; |
||
20 | |||
21 | public function plan() |
||
25 | |||
26 | public function getPrice(): float |
||
30 | |||
31 | public static function make($type, int $unit, float $price): PlanIntervalContract |
||
43 | |||
44 | public static function makeInfinite(float $price): PlanIntervalContract |
||
50 | |||
51 | public function getType(): string |
||
55 | |||
56 | public function getUnit(): int |
||
60 | |||
61 | public function isInfinite(): bool |
||
65 | |||
66 | protected static function checkIfIntervalExists(string $interval) |
||
77 | |||
78 | public function isFree(): bool |
||
82 | |||
83 | public function isNotFree(): bool |
||
87 | } |
||
88 |