mirror of
https://github.com/Bigherollc/wticreatorstudio.git
synced 2026-08-03 15:17:03 -04:00
54 lines
1.3 KiB
PHP
54 lines
1.3 KiB
PHP
<?php
|
|
|
|
namespace Modules\StaffPayroll\Entities;
|
|
|
|
use Carbon\Carbon;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Modules\StudioPlus\Entities\StudioPlusVideo;
|
|
use Modules\StudioPlusWtiiabaddon\Entities\StudioPlusIncentive;
|
|
|
|
class InvoiceItem extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $fillable = [
|
|
'invoice_id',
|
|
'studio_plus_incentive_id',
|
|
'studio_plus_video_id',
|
|
'item_no',
|
|
'name',
|
|
'description',
|
|
'issue_date',
|
|
'amount',
|
|
'quantity',
|
|
'type',
|
|
'range_amount'
|
|
];
|
|
|
|
protected $casts = [
|
|
'amount' => 'float',
|
|
'quantity' => 'integer'
|
|
];
|
|
|
|
public const TYPE_VIDEO_UPLOAD_PAYOUT = 'VIDEO UPLOAD PAYOUT';
|
|
public const TYPE_DOWNLINE_INCENTIVES = 'DOWNLINE INCENTIVES';
|
|
public const TYPE_REFERRAL = 'REFERRAL';
|
|
public const TYPE_INCENTIVE_BONUS = 'INCENTIVE BONUS';
|
|
|
|
public function invoice()
|
|
{
|
|
return $this->belongsTo(Invoice::class, 'invoice_id');
|
|
}
|
|
|
|
public function incentive()
|
|
{
|
|
return $this->belongsTo(StudioPlusIncentive::class, 'studio_plus_incentive_id');
|
|
}
|
|
|
|
public function video()
|
|
{
|
|
return $this->belongsTo(StudioPlusVideo::class, 'studio_plus_video_id');
|
|
}
|
|
}
|