first commit
This commit is contained in:
commit
405df0a122
3083 changed files with 69203 additions and 0 deletions
92
dev/Models/PaymentOption.php
Normal file
92
dev/Models/PaymentOption.php
Normal file
|
|
@ -0,0 +1,92 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class PaymentOption
|
||||
*
|
||||
* @property int $id
|
||||
* @property string $article_number
|
||||
* @property string $type
|
||||
* @property float $price
|
||||
* @property int|null $is_hidden
|
||||
* @property string|null $event_name_prefix
|
||||
* @property int|null $activate_on_first_payment
|
||||
* @property Collection|Coupon[] $coupons
|
||||
* @property PaymentOptionAccessGroup $payment_option_access_group
|
||||
* @property PaymentOptionExcludeGroup $payment_option_exclude_group
|
||||
* @property PaymentOptionReference $payment_option_reference
|
||||
* @property PaymentOptionTranslation $payment_option_translation
|
||||
* @property Collection|UserPaymentOption[] $user_payment_options
|
||||
* @package App\Models
|
||||
* @property-read int|null $coupons_count
|
||||
* @property-read int|null $user_payment_options_count
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PaymentOption newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PaymentOption newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PaymentOption query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PaymentOption whereActivateOnFirstPayment($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PaymentOption whereArticleNumber($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PaymentOption whereEventNamePrefix($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PaymentOption whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PaymentOption whereIsHidden($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PaymentOption wherePrice($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PaymentOption whereType($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class PaymentOption extends Model
|
||||
{
|
||||
protected $table = 'payment_option';
|
||||
public $timestamps = false;
|
||||
|
||||
protected $casts = [
|
||||
'price' => 'float',
|
||||
'is_hidden' => 'int',
|
||||
'activate_on_first_payment' => 'int'
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'article_number',
|
||||
'type',
|
||||
'price',
|
||||
'is_hidden',
|
||||
'event_name_prefix',
|
||||
'activate_on_first_payment'
|
||||
];
|
||||
|
||||
public function coupons()
|
||||
{
|
||||
return $this->hasMany(Coupon::class);
|
||||
}
|
||||
|
||||
public function payment_option_access_group()
|
||||
{
|
||||
return $this->hasOne(PaymentOptionAccessGroup::class);
|
||||
}
|
||||
|
||||
public function payment_option_exclude_group()
|
||||
{
|
||||
return $this->hasOne(PaymentOptionExcludeGroup::class);
|
||||
}
|
||||
|
||||
public function payment_option_reference()
|
||||
{
|
||||
return $this->hasOne(PaymentOptionReference::class, 'parent_payment_option_id');
|
||||
}
|
||||
|
||||
public function payment_option_translation()
|
||||
{
|
||||
return $this->hasOne(PaymentOptionTranslation::class, 'id');
|
||||
}
|
||||
|
||||
public function user_payment_options()
|
||||
{
|
||||
return $this->hasMany(UserPaymentOption::class);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue