1 | <?php |
||
9 | class PlanPrice extends Model implements PlanPriceContract |
||
10 | { |
||
11 | protected $table = 'plan_prices'; |
||
12 | |||
13 | protected $fillable = [ |
||
14 | 'amount', '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 getAmount(): int |
||
30 | |||
31 | public static function make($interval, int $intervalUnit, float $amount): PlanPriceContract |
||
43 | |||
44 | public static function makeWithoutInterval(float $amount): PlanPriceContract |
||
50 | |||
51 | public function getInterval(): string |
||
55 | |||
56 | public function getIntervalUnit(): int |
||
60 | |||
61 | protected static function checkPriceInterval(string $interval) |
||
72 | } |
||
73 |