first commit
This commit is contained in:
commit
405df0a122
3083 changed files with 69203 additions and 0 deletions
115
dev/Models/Invoice.php
Normal file
115
dev/Models/Invoice.php
Normal file
|
|
@ -0,0 +1,115 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class Invoice
|
||||
*
|
||||
* @property int $id
|
||||
* @property int $user_id
|
||||
* @property int $user_payment_id
|
||||
* @property int $billing_address_id
|
||||
* @property string $number
|
||||
* @property string $status
|
||||
* @property int|null $reminder_count
|
||||
* @property Carbon|null $next_reminder_date
|
||||
* @property float $amount
|
||||
* @property int|null $is_netto
|
||||
* @property int $is_media
|
||||
* @property Carbon $invoice_date
|
||||
* @property Carbon $due_date
|
||||
* @property Carbon|null $service_period_begin_date
|
||||
* @property Carbon|null $service_period_end_date
|
||||
* @property string|null $payment_method
|
||||
* @property Carbon|null $pay_date
|
||||
* @property Carbon|null $created_at
|
||||
* @property Carbon|null $updated_at
|
||||
* @property InvoiceBillingAddress $invoice_billing_address
|
||||
* @property SfGuardUser $sf_guard_user
|
||||
* @property UserPayment $user_payment
|
||||
* @package App\Models
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Invoice newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Invoice newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Invoice query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Invoice whereAmount($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Invoice whereBillingAddressId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Invoice whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Invoice whereDueDate($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Invoice whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Invoice whereInvoiceDate($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Invoice whereIsMedia($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Invoice whereIsNetto($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Invoice whereNextReminderDate($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Invoice whereNumber($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Invoice wherePayDate($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Invoice wherePaymentMethod($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Invoice whereReminderCount($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Invoice whereServicePeriodBeginDate($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Invoice whereServicePeriodEndDate($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Invoice whereStatus($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Invoice whereUpdatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Invoice whereUserId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Invoice whereUserPaymentId($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class Invoice extends Model
|
||||
{
|
||||
protected $table = 'invoice';
|
||||
|
||||
protected $casts = [
|
||||
'user_id' => 'int',
|
||||
'user_payment_id' => 'int',
|
||||
'billing_address_id' => 'int',
|
||||
'reminder_count' => 'int',
|
||||
'next_reminder_date' => 'datetime',
|
||||
'amount' => 'float',
|
||||
'is_netto' => 'int',
|
||||
'is_media' => 'int',
|
||||
'invoice_date' => 'datetime',
|
||||
'due_date' => 'datetime',
|
||||
'service_period_begin_date' => 'datetime',
|
||||
'service_period_end_date' => 'datetime',
|
||||
'pay_date' => 'datetime'
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'user_id',
|
||||
'user_payment_id',
|
||||
'billing_address_id',
|
||||
'number',
|
||||
'status',
|
||||
'reminder_count',
|
||||
'next_reminder_date',
|
||||
'amount',
|
||||
'is_netto',
|
||||
'is_media',
|
||||
'invoice_date',
|
||||
'due_date',
|
||||
'service_period_begin_date',
|
||||
'service_period_end_date',
|
||||
'payment_method',
|
||||
'pay_date'
|
||||
];
|
||||
|
||||
public function invoice_billing_address()
|
||||
{
|
||||
return $this->belongsTo(InvoiceBillingAddress::class, 'billing_address_id');
|
||||
}
|
||||
|
||||
public function sf_guard_user()
|
||||
{
|
||||
return $this->belongsTo(SfGuardUser::class, 'user_id');
|
||||
}
|
||||
|
||||
public function user_payment()
|
||||
{
|
||||
return $this->belongsTo(UserPayment::class);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue