<?php

namespace ModulesGarden\HostingRenewals\App\Models;

use \ModulesGarden\HostingRenewals\Core\Models\ExtendedEloquentModel;
use ModulesGarden\HostingRenewals\Core\WHMCS\Models\Hosting;

/**
 * Description of ProductReminders
 * 
 * @var int id
 * @var int billing_cycle
 * @var int template_id 
 * @var int period
 * @var varchar(100) status
 * 
 * 
 */
class ProductReminders extends ExtendedEloquentModel
{
    const STATUS_ON = 'on';
    const STATUS_OFF = 'off';
    /**
     * Table name
     *
     * @var string
     */
    protected $table = 'ProductReminders';

    /**
     * Eloquent guarded parameters
     * @var array
     */
    protected $guarded = array('id');

    /**
     * Eloquent fillable parameters
     * @var array
     */
    protected $fillable = array('product_id', 'billing_cycle', 'template_id', 'period', 'status');

    /**
     * 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 hostings()
    {
        return $this->hasMany(Hosting::class, 'packageid', 'product_id');
    }

}
