12-05-2026 Frontend dev
This commit is contained in:
parent
405df0a122
commit
5b8bdf4182
779 changed files with 480564 additions and 6241 deletions
45
app/Models/PaymentOption.php
Normal file
45
app/Models/PaymentOption.php
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use App\Enums\PaymentOptionType;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class PaymentOption extends Model
|
||||
{
|
||||
use HasFactory, SoftDeletes;
|
||||
|
||||
protected $fillable = [
|
||||
'article_number',
|
||||
'type',
|
||||
'price_cents',
|
||||
'currency',
|
||||
'interval',
|
||||
'is_hidden',
|
||||
'stripe_product_id',
|
||||
'stripe_price_id',
|
||||
];
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
'type' => PaymentOptionType::class,
|
||||
'price_cents' => 'integer',
|
||||
'is_hidden' => 'boolean',
|
||||
'deleted_at' => 'datetime',
|
||||
];
|
||||
}
|
||||
|
||||
public function translations(): HasMany
|
||||
{
|
||||
return $this->hasMany(PaymentOptionTranslation::class);
|
||||
}
|
||||
|
||||
public function userPaymentOptions(): HasMany
|
||||
{
|
||||
return $this->hasMany(UserPaymentOption::class);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue