12345678910111213141516171819202122232425262728293031 |
- <?php
- // +----------------------------------------------------------------------
- // | ThinkCMF [ WE CAN DO IT MORE SIMPLE ]
- // +----------------------------------------------------------------------
- // | Copyright (c) 2013-2019 http://www.thinkcmf.com All rights reserved.
- // +----------------------------------------------------------------------
- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
- // +----------------------------------------------------------------------
- // | Author: 老猫 <thinkcmf@126.com>
- // +----------------------------------------------------------------------
- namespace app\matchmaker\model;
- use think\Model;
- class MatchmakerUserModel extends Model
- {
- protected $type = [
- 'family' => 'array',
- ];
- public function matchmaker()
- {
- return $this->hasOne(MatchmakerModel::class,'id','matchmaker_id');
- }
- public function getSexTextAttr($value, $data)
- {
- $sex = ['保密', '男', '女'];
- return $sex[$data['sex']];
- }
- }
|