EmailTemplate.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <?php
  2. namespace ModulesGarden\ProxmoxAddon\App\Models\Whmcs;
  3. /**
  4. * @property int $id
  5. * @property string $type
  6. * @property string $name
  7. * @property string $subject
  8. * @property string $message
  9. * @property string $attachments
  10. * @property string $fromname
  11. * @property string $fromemail
  12. * @property int $disabled
  13. * @property int $custom
  14. * @property string $language
  15. * @property string $copyto
  16. * @property string $blind_copy_to
  17. * @property int $plaintext
  18. * @property string $created_at
  19. * @property string $updated_at
  20. * @method static $this ofAdmin()
  21. * @method static $this ofGeneral()
  22. * @method static $this ofCustom()
  23. * @method static $this ofProduct()
  24. * @method $this ofName($name)
  25. */
  26. class EmailTemplate extends \ModulesGarden\ProxmoxAddon\Core\Models\Whmcs\EmailTemplate
  27. {
  28. public function scopeOfAdmin($query)
  29. {
  30. return $query->where("type", "admin");
  31. }
  32. public function scopeOfGeneral($query)
  33. {
  34. return $query->where("type", "general");
  35. }
  36. public function scopeOfProduct($query)
  37. {
  38. return $query->where("type", "product");
  39. }
  40. public function scopeOfCustom($query)
  41. {
  42. return $query->where("custom", 1);
  43. }
  44. public function scopeOfName($query, $name)
  45. {
  46. return $query->where("name", $name);
  47. }
  48. }