Domain.php 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. <?php
  2. namespace ThurData\Servers\KerioEmail\Core\Models\Whmcs;
  3. use \Illuminate\Database\Eloquent\Model as EloquentModel;
  4. /**
  5. * Description of Domain
  6. *
  7. * @var id
  8. * @var userid
  9. * @var orderid
  10. * @var type
  11. * @var registrationdate
  12. * @var domain
  13. * @var firstpaymentamount
  14. * @var recurringamount
  15. * @var registrar
  16. * @var registrationperiod
  17. * @var expirydate
  18. * @var subscriptionid
  19. * @var promoid
  20. * @var status
  21. * @var nextduedate
  22. * @var nextinvoicedate
  23. * @var additionalnotes
  24. * @var paymentmethod
  25. * @var dnsmanagement
  26. * @var emailforwarding
  27. * @var idprotection
  28. * @var is_premium
  29. * @var donotrenew
  30. * @var reminders
  31. * @var synced
  32. * @var created_at
  33. * @var updated_at
  34. *
  35. * @autor ThurData <info@thrudata.ch>
  36. */
  37. class Domain extends EloquentModel
  38. {
  39. /**
  40. * Table name
  41. *
  42. * @var string
  43. */
  44. protected $table = 'tbldomains';
  45. protected $primaryKey = 'id';
  46. /**
  47. * Eloquent guarded parameters
  48. * @var array
  49. */
  50. protected $guarded = ['id'];
  51. /**
  52. * Eloquent fillable parameters
  53. * @var array
  54. */
  55. protected $fillable = ['userid', 'orderid', 'type', 'registrationdate', 'domain', 'firstpaymentamount', 'recurringamount', 'registrar', 'registrationperiod', 'expirydate', 'subscriptionid', 'promoid', 'status', 'nextduedate', 'nextinvoicedate', 'additionalnotes', 'paymentmethod', 'dnsmanagement', 'emailforwarding', 'idprotection', 'is_premium', 'donotrenew', 'reminders', 'synced', 'created_at', 'updated_at'];
  56. /**
  57. * Indicates if the model should soft delete.
  58. *
  59. * @var bool
  60. */
  61. protected $softDelete = false;
  62. /**
  63. * Indicates if the model should be timestamped.
  64. *
  65. * @var bool
  66. */
  67. public $timestamps = false;
  68. public function __construct(array $attributes = [])
  69. {
  70. parent::__construct($attributes);
  71. }
  72. public function client()
  73. {
  74. return $this->belongsTo("ThurData\Servers\KerioEmail\Core\Models\Whmcs\Client", "userid");
  75. }
  76. public function order()
  77. {
  78. return $this->belongsTo("ThurData\Servers\KerioEmail\Core\Models\Whmcs\Order", "orderid");
  79. }
  80. }