| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- <?php
- namespace ThurData\Servers\KerioEmail\Core\Models\Whmcs;
- use \Illuminate\Database\Eloquent\Model as EloquentModel;
- /**
- * Description of Product
- *
- * @author Paweł Złamaniec <pawel.zl@thurdata.com>
- */
- class Order extends EloquentModel
- {
- /**
- * Table name
- *
- * @var string
- */
- protected $table = 'tblorders';
- protected $primaryKey = 'id';
-
- /**
- * Eloquent guarded parameters
- * @var array
- */
- protected $guarded = ['id'];
- /**
- * Eloquent fillable parameters
- * @var array
- */
- protected $fillable = ['ordernum', 'userid', 'contactid', 'date', 'nameservers', 'transfersecret', 'renewals', 'promocode', 'promotype', 'promovalue', 'orderdata', 'amount', 'paymentmethod', 'invoiceid', 'status', 'ipaddress', 'fraudmodule', 'fraudoutput', 'notes'];
- /**
- * Indicates if the model should soft delete.
- *
- * @var bool
- */
- protected $softDelete = false;
- /**
- * Indicates if the model should be timestamped.
- *
- * @var bool
- */
- public $timestamps = false;
-
- public function __construct(array $attributes = [])
- {
- parent::__construct($attributes);
- }
- public function hostings()
- {
- return $this->hasMany('ThurData\Servers\KerioEmail\Core\Models\Whmcs\Hosting', 'orderid');
- }
- public function domains()
- {
- return $this->hasMany('ThurData\Servers\KerioEmail\Core\Models\Whmcs\Domain', 'orderid');
- }
- public function addons()
- {
- return $this->hasMany('ThurData\Servers\KerioEmail\Core\Models\Whmcs\HostingAddon', 'orderid');
- }
- public function upgrades()
- {
- return $this->hasMany('ThurData\Servers\KerioEmail\Core\Models\Whmcs\Upgrade', 'orderid');
- }
- public function invoice()
- {
- return $this->hasOne('ThurData\Servers\KerioEmail\Core\Models\Whmcs\Invoice', 'id', 'invoiceid');
- }
- /**
- * Get Realted client
- */
- public function client()
- {
- return $this->belongsTo('ThurData\Servers\KerioEmail\Core\Models\Whmcs\Client', 'userid');
- }
- }
|