ProductCodeModel.php 873 B

123456789101112131415161718192021222324252627
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | ThinkCMF [ WE CAN DO IT MORE SIMPLE ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2013-2019 http://www.thinkcmf.com All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
  8. // +----------------------------------------------------------------------
  9. // | Author: 老猫 <thinkcmf@126.com>
  10. // +----------------------------------------------------------------------
  11. namespace app\rob\model;
  12. use think\Model;
  13. class ProductCodeModel extends Model
  14. {
  15. /**
  16. * 状态名
  17. */
  18. public function getStatusTextAttr($value, $data)
  19. {
  20. $status = ['', '已使用', '未使用'];
  21. return $status[$data['status']];
  22. }
  23. }