Email.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <?php
  2. namespace ThurData\Servers\KerioEmail\Core\Models\Whmcs;
  3. use \Illuminate\Database\Eloquent\Model as EloquentModel;
  4. /**
  5. * Description of Product
  6. *
  7. * @autor ThurData <info@thrudata.ch>
  8. */
  9. class Email extends EloquentModel
  10. {
  11. /**
  12. * Table name
  13. *
  14. * @var string
  15. */
  16. protected $table = 'tblemails';
  17. protected $primaryKey = 'id';
  18. /**
  19. * Eloquent guarded parameters
  20. * @var array
  21. */
  22. protected $guarded = ['id'];
  23. /**
  24. * Eloquent fillable parameters
  25. * @var array
  26. */
  27. protected $fillable = ["userid", "subject", "message", "date", "to", "cc", "bcc"];
  28. /**
  29. * Indicates if the model should soft delete.
  30. *
  31. * @var bool
  32. */
  33. protected $softDelete = false;
  34. /**
  35. * Indicates if the model should be timestamped.
  36. *
  37. * @var bool
  38. */
  39. public $timestamps = false;
  40. public function __construct(array $attributes = [])
  41. {
  42. parent::__construct($attributes);
  43. }
  44. /**
  45. * Add relation to client
  46. *
  47. * @return type
  48. */
  49. public function client()
  50. {
  51. return $this->belongsTo("ThurData\Servers\KerioEmail\Core\Models\Whmcs\Client", "userid");
  52. }
  53. }