1 | <?php |
||
10 | class PlanInterval extends Model implements PlanIntervalContract |
||
11 | { |
||
12 | protected $table = 'plan_intervals'; |
||
13 | |||
14 | protected $fillable = [ |
||
15 | 'price', 'interval', 'interval_unit', |
||
16 | ]; |
||
17 | |||
18 | public static $DAY = 'day'; |
||
19 | public static $MONTH = 'month'; |
||
20 | public static $YEAR = 'year'; |
||
21 | |||
22 | public function plan() |
||
26 | |||
27 | public function getPrice(): float |
||
31 | |||
32 | public static function make($type, int $unit, float $price): PlanIntervalContract |
||
44 | |||
45 | public static function makeInfinite(float $price): PlanIntervalContract |
||
51 | |||
52 | public function getType(): string |
||
56 | |||
57 | public function getUnit(): int |
||
61 | |||
62 | public function isInfinite(): bool |
||
66 | |||
67 | protected static function checkIfIntervalExists(string $interval) |
||
78 | |||
79 | public function isFree(): bool |
||
83 | |||
84 | public function isNotFree(): bool |
||
88 | } |
||
89 |