62 lines
1.8 KiB
PHP
62 lines
1.8 KiB
PHP
<?php
|
|
|
|
/**
|
|
* Created by Reliese Model.
|
|
*/
|
|
|
|
namespace App\Models;
|
|
|
|
use Carbon\Carbon;
|
|
use Illuminate\Database\Eloquent\Collection;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
/**
|
|
* Class UserPayment
|
|
*
|
|
* @property int $id
|
|
* @property int $user_payment_option_id
|
|
* @property float $amount
|
|
* @property string $status
|
|
* @property Carbon|null $created_at
|
|
* @property Carbon|null $updated_at
|
|
* @property UserPaymentOption $user_payment_option
|
|
* @property Collection|Invoice[] $invoices
|
|
* @property-read int|null $invoices_count
|
|
*
|
|
* @method static \Illuminate\Database\Eloquent\Builder|UserPayment newModelQuery()
|
|
* @method static \Illuminate\Database\Eloquent\Builder|UserPayment newQuery()
|
|
* @method static \Illuminate\Database\Eloquent\Builder|UserPayment query()
|
|
* @method static \Illuminate\Database\Eloquent\Builder|UserPayment whereAmount($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|UserPayment whereCreatedAt($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|UserPayment whereId($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|UserPayment whereStatus($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|UserPayment whereUpdatedAt($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder|UserPayment whereUserPaymentOptionId($value)
|
|
*
|
|
* @mixin \Eloquent
|
|
*/
|
|
class UserPayment extends Model
|
|
{
|
|
protected $table = 'user_payment';
|
|
|
|
protected $casts = [
|
|
'user_payment_option_id' => 'int',
|
|
'amount' => 'float',
|
|
];
|
|
|
|
protected $fillable = [
|
|
'user_payment_option_id',
|
|
'amount',
|
|
'status',
|
|
];
|
|
|
|
public function user_payment_option()
|
|
{
|
|
return $this->belongsTo(UserPaymentOption::class);
|
|
}
|
|
|
|
public function invoices()
|
|
{
|
|
return $this->hasMany(Invoice::class);
|
|
}
|
|
}
|