Membership

This commit is contained in:
Kevin Adametz 2020-03-07 19:44:58 +01:00
parent 37cb2b06c7
commit 21abafb8db
51 changed files with 1549 additions and 493 deletions

View file

@ -90,11 +90,25 @@ use Illuminate\Database\Eloquent\SoftDeletes;
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\ProductImage[] $imagesActive
* @property-read int|null $images_active_count
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Product wherePoints($value)
* @property string|null $identifier
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Product whereIdentifier($value)
* @property int|null $upgrade_to_id
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Product whereUpgradeToId($value)
*/
class Product extends Model
{
/*identifiers
show_upgrade # in membership payment can upgrade this package to show order
show_order # in membership payment show always
upgrade # need upgrade_to_id set user->payment_order_id to the package in the payment api
*/
protected $identifiers_types = [
'show_upgrade' => 'Kann gepdatet werden',
'show_order' => 'Wird immer als Option angezeigt',
'upgrade' => 'Produktupgrade zu upgrade_to_id',
];
protected $table = 'products';
protected $casts = [
@ -134,7 +148,8 @@ class Product extends Model
'active',
'show_at',
'identifier',
'action'
'action',
'upgrade_to_id'
];
public $showATs = [
@ -148,6 +163,7 @@ class Product extends Model
public $actions = [
0 => 'payment_for_account',
1 => 'payment_for_shop',
2 => 'payment_for_shop_upgrade',
];
public function sluggable()