| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- <?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 HostingAddon extends EloquentModel
- {
- /**
- * Table name
- *
- * @var string
- */
- protected $table = 'tblhostingaddons';
- protected $primaryKey = 'id';
-
- /**
- * Eloquent guarded parameters
- * @var array
- */
- protected $guarded = ['id'];
- /**
- * Eloquent fillable parameters
- * @var array
- */
- protected $fillable = ['orderid', 'hostingid', 'addonid', 'userid', 'server', 'name', 'setupfee', 'recuring', 'billingcycle', 'tax', 'status', 'regdate', 'nextduedate', 'nextinvoicedate', 'termination_date', 'peymentmethod', '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 addon()
- {
- return $this->belongsTo("ThurData\Servers\KerioEmail\Core\Models\Whmcs\Addon", "addonid");
- }
- public function hosting()
- {
- return $this->belongsTo("ThurData\Servers\KerioEmail\Core\Models\Whmcs\Hosting", "hostingid");
- }
- public function order()
- {
- return $this->belongsTo("ThurData\Servers\KerioEmail\Core\Models\Whmcs\Order", "orderid");
- }
- public function getBillingcycleFriendlyAttribute()
- {
- return $this->attributes['billingcycle'];
- }
- }
|