| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- <?php
- namespace ThurData\Servers\KerioEmail\Core\Models\Whmcs;
- use \Illuminate\Database\Eloquent\Model as EloquentModel;
- /**
- * Description of Product
- *
- * @autor ThurData <info@thurdata.ch>
- */
- class InvoiceItem extends EloquentModel
- {
- /**
- * Table name
- *
- * @var string
- */
- protected $table = 'tblinvoiceitems';
- protected $primaryKey = 'id';
-
- /**
- * Eloquent guarded parameters
- * @var array
- */
- protected $guarded = ['id'];
- /**
- * Eloquent fillable parameters
- * @var array
- */
- protected $fillable = ['invoiceid', 'userid', 'type', 'relid', 'description', 'amount', 'taxed', 'duedate', 'paymentmethod', 'notes'];
- /**
- * Indicates if the model should soft delete.
- *
- * @var bool
- */
- protected $softDelete = false;
-
-
- public function __construct(array $attributes = [])
- {
- parent::__construct($attributes);
- }
- /**
- * Indicates if the model should be timestamped.
- *
- * @var bool
- */
- public $timestamps = false;
- public function client()
- {
- return $this->hasOne("ThurData\Servers\KerioEmail\Core\Models\Whmcs\Client", "id", "userid");
- }
- public function invoice()
- {
- return $this->belongsTo("ThurData\Servers\KerioEmail\Core\Models\Whmcs\Invoice", "invoiceid");
- }
- public function hosting()
- {
- return $this->hasOne("ThurData\Servers\KerioEmail\Core\Models\Whmcs\Hosting", "id", "relid");
- }
- public function hostingAddon()
- {
- return $this->hasOne("ThurData\Servers\KerioEmail\Core\Models\Whmcs\HostingAddon", "id", "relid");
- }
- public function domain()
- {
- return $this->hasOne("ThurData\Servers\KerioEmail\Core\Models\Whmcs\Domain", "id", "relid");
- }
- public function upgrade()
- {
- return $this->hasOne("ThurData\Servers\KerioEmail\Core\Models\Whmcs\Upgrade", "id", "relid");
- }
- }
|