Sms.php 813 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. /**
  3. * 阿里云手机短信管理模型
  4. */
  5. namespace app\model\plugin\ali;
  6. use laytp\BaseModel;
  7. use think\model\concern\SoftDelete;
  8. class Sms extends BaseModel
  9. {
  10. use SoftDelete;
  11. //模型名
  12. protected $name = 'plugin\ali_sms';
  13. //附加属性
  14. protected $append = [];
  15. //时间戳字段转换
  16. //表名
  17. //关联模型
  18. //新增属性的方法
  19. public function getCreateTimeIntAttr($value, $data)
  20. {
  21. return isset($data['create_time']) ? strtotime($data['create_time']) : 0;
  22. }
  23. public function getUpdateTimeIntAttr($value, $data)
  24. {
  25. return isset($data['update_time']) ? strtotime($data['update_time']) : 0;
  26. }
  27. public function getDeleteTimeIntAttr($value, $data)
  28. {
  29. return isset($data['delete_time']) ? strtotime($data['delete_time']) : 0;
  30. }
  31. }