FormApproval.php 632 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. namespace addons\qingdong\model;
  3. use think\Model;
  4. use traits\model\SoftDelete;
  5. /**
  6. * 审批表单配置
  7. */
  8. class FormApproval extends Model {
  9. use SoftDelete;
  10. // 表名,不含前缀
  11. protected $name = 'qingdong_form_approval';
  12. // 自动写入时间戳字段
  13. protected $autoWriteTimestamp = 'int';
  14. // 定义时间戳字段名
  15. protected $createTime = 'createtime';
  16. protected $updateTime = 'updatetime';
  17. protected $deleteTime = 'deletetime';
  18. public function getUpdatetimeAttr($value){
  19. return date('Y-m-d H:i',$value);
  20. }
  21. public static function getImgAttr($value){
  22. return cdnurl($value,true);
  23. }
  24. }