CustomerPortraitField.php 396 B

123456789101112131415161718192021
  1. <?php
  2. namespace app\model;
  3. use think\Model;
  4. class CustomerPortraitField extends Model
  5. {
  6. // public function getSelectAttr($value)
  7. // {
  8. // if($value=='[]'|| $value==null) return;
  9. // $list=json_decode($value,true);
  10. // return $list;
  11. // }
  12. public function select()
  13. {
  14. return $this->hasMany(CustomerPortraitFieldSelect::class, 'pid','id');
  15. }
  16. }