Changeset View
Changeset View
Standalone View
Standalone View
src/app/Plan.php
Show All 12 Lines | |||||
* A Plan is a grouping of packages, such as a "Family Plan". | * A Plan is a grouping of packages, such as a "Family Plan". | ||||
* | * | ||||
* A "Family Plan" as such may exist of "2 or more Kolab packages", | * A "Family Plan" as such may exist of "2 or more Kolab packages", | ||||
* and apply a discount for the third and further Kolab packages. | * and apply a discount for the third and further Kolab packages. | ||||
* | * | ||||
* @property string $description | * @property string $description | ||||
* @property int $discount_qty | * @property int $discount_qty | ||||
* @property int $discount_rate | * @property int $discount_rate | ||||
* @property int $free_months | |||||
* @property string $id | * @property string $id | ||||
* @property string $mode Plan signup mode (email|token) | * @property string $mode Plan signup mode (email|token) | ||||
* @property string $name | * @property string $name | ||||
* @property \App\Package[] $packages | * @property \App\Package[] $packages | ||||
* @property datetime $promo_from | * @property datetime $promo_from | ||||
* @property datetime $promo_to | * @property datetime $promo_to | ||||
* @property ?int $tenant_id | * @property ?int $tenant_id | ||||
* @property string $title | * @property string $title | ||||
Show All 14 Lines | protected $fillable = [ | ||||
'description', | 'description', | ||||
// a start and end datetime for this promotion | // a start and end datetime for this promotion | ||||
'promo_from', | 'promo_from', | ||||
'promo_to', | 'promo_to', | ||||
// discounts start at this quantity | // discounts start at this quantity | ||||
'discount_qty', | 'discount_qty', | ||||
// the rate of the discount for this plan | // the rate of the discount for this plan | ||||
'discount_rate', | 'discount_rate', | ||||
// number of free months (trial) | |||||
'free_months', | |||||
]; | ]; | ||||
/** @var array<string, string> The attributes that should be cast */ | /** @var array<string, string> The attributes that should be cast */ | ||||
protected $casts = [ | protected $casts = [ | ||||
'promo_from' => 'datetime:Y-m-d H:i:s', | 'promo_from' => 'datetime:Y-m-d H:i:s', | ||||
'promo_to' => 'datetime:Y-m-d H:i:s', | 'promo_to' => 'datetime:Y-m-d H:i:s', | ||||
'discount_qty' => 'integer', | 'discount_qty' => 'integer', | ||||
'discount_rate' => 'integer' | 'discount_rate' => 'integer', | ||||
'free_months' => 'integer' | |||||
]; | ]; | ||||
/** @var array<int, string> Translatable properties */ | /** @var array<int, string> Translatable properties */ | ||||
public $translatable = [ | public $translatable = [ | ||||
'name', | 'name', | ||||
'description', | 'description', | ||||
]; | ]; | ||||
▲ Show 20 Lines • Show All 54 Lines • Show Last 20 Lines |