1 | <?php |
||
11 | class PlanPrice extends Model implements PlanPriceContract |
||
12 | { |
||
13 | protected $table = 'plan_prices'; |
||
14 | |||
15 | protected $fillable = [ |
||
16 | 'amount', 'interval', 'interval_unit' |
||
17 | ]; |
||
18 | |||
19 | public static $DAY = 'day'; |
||
20 | public static $MONTH = 'month'; |
||
21 | public static $YEAR = 'year'; |
||
22 | |||
23 | public function plan() |
||
27 | |||
28 | public function getAmount(): int |
||
32 | |||
33 | public static function make($interval, int $intervalUnit, float $amount): PlanPriceContract |
||
45 | |||
46 | public static function makeWithoutInterval(float $amount): PlanPriceContract |
||
52 | |||
53 | public function getInterval(): string |
||
57 | |||
58 | public function getIntervalUnit(): int |
||
62 | |||
63 | protected static function checkPriceInterval(string $interval) |
||
74 | } |
||
75 |