SmsConfig.php 827 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <?php
  2. namespace App\Module\Sms\Models;
  3. use UCore\ModelCore;
  4. use UCore\Model;
  5. /**
  6. * 短信配置模型
  7. *
  8. * field start
  9. * field end
  10. */
  11. class SmsConfig extends ModelCore
  12. {
  13. /**
  14. * 数据表名称
  15. *
  16. * @var string
  17. */
  18. protected $table = 'sms_config';
  19. /**
  20. * 可批量赋值的属性
  21. *
  22. * @var array
  23. */
  24. protected $fillable = [
  25. 'driver',
  26. 'is_open',
  27. 'title',
  28. 'desc',
  29. 'type',
  30. 'value',
  31. 'group'
  32. ];
  33. /**
  34. * 应该被调整为日期的属性
  35. *
  36. * @var array
  37. */
  38. protected $dates = [
  39. 'created_at',
  40. 'updated_at'
  41. ];
  42. /**
  43. * 属性类型转换
  44. *
  45. * @var array
  46. */
  47. protected $casts = [
  48. 'type' => 'integer',
  49. 'is_open' => 'boolean'
  50. ];
  51. }